Ask Your Question
1

facter .bat undefined method each line

asked 2013-11-21 07:46:42 -0500

John Hancock CSC gravatar image

I am trying to get external facts generated through a windows script file .bat or .cmd and .ps1 All of these cause facter to fail when run manually even in --debug mode

error message is undefined method 'each line' for nil:Nilclass

These only fail on windows 2003 Server. Server 2008 appears ok

External facts captured through .txt .json or .yaml work ok

edit retag flag offensive close merge delete

Comments

On the Server 2003 system, do the facts run properly when you manually run the .bat / .cmd / .ps1 ? How were the facts generated - placed by puppet? Does the security policy ...(more)

llowder gravatar imagellowder ( 2013-12-09 16:08:27 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-02-20 12:22:45 -0500

joshc gravatar image

This is http://projects.puppetlabs.com/issues/22622 , which is fixed in facter 1.7.4[1]. Basically, if any script based external executable fact doesn't return any output, then facter will fail. Try downloading the latest Puppet 3.4.3 MSI, which ships with facter 1.7.5.

[1] https://groups.google.com/forum/#!msg/puppet-dev/F62Y5ttfjRQ/zcAIRZvr98oJ

edit flag offensive delete link more

Comments

Ah...just came back to ask...need to go try this out.

John Hancock CSC gravatar imageJohn Hancock CSC ( 2014-04-17 03:18:41 -0500 )edit

John, was this the answer? If so can you mark this as the answer?

rob gravatar imagerob ( 2014-10-03 22:07:01 -0500 )edit

Hi Rob...its taken me some time to get my lab system back up and running but the latest

John Hancock CSC gravatar imageJohn Hancock CSC ( 2014-10-08 11:24:18 -0500 )edit

John, I think your comment was cut short.

rob gravatar imagerob ( 2014-10-10 14:06:57 -0500 )edit

Hi Rob cut short indeed. I was going to say that I have now tested with PE 3.3.2 which has come with FACTER ver 1.7.5 on Win XP. Custom facts from a .cmd file appear to be working ok. Still need to test .ps and on a W2k3 server.

John Hancock CSC gravatar imageJohn Hancock CSC ( 2014-10-12 09:32:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-11-21 07:46:42 -0500

Seen: 214 times

Last updated: Feb 20 '14