Grant Trevor
2013-Apr-09 15:44 UTC
[Puppet Users] External Facts on Windows with Powershell
I''m trying to follow the steps on http://docs.puppetlabs.com/guides/custom_facts.html in regards to declaring External Facts using powershell. I''ve created a simple .ps1 file outputing a single key pair eg: Write-Host "mykey=123456", however if I run Facter from the Command Prompt(with puppet) my value isn''t present. Also if I run ''puppet apply MyModule.pp --verbose'' I don''t receive any information about it attempting to load facts. I''ve also tried a simple txt file with no luck. I''m using Puppet 2.7.17 installed via chocolatey, could this be a configuration issue, do I need to enable External Task parsing? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Justin Stoller
2013-Apr-10 23:45 UTC
Re: [Puppet Users] External Facts on Windows with Powershell
This only works in Facter 1.7, what do you get when you run `facter --version`? Have you double checked http://docs.puppetlabs.com/guides/custom_facts.html#enabling-powershell-scriptsto ensure that the powershell scripts are enabled? - Justin On Tue, Apr 9, 2013 at 8:44 AM, Grant Trevor <grant.trevor@gmail.com> wrote:> I''m trying to follow the steps on > http://docs.puppetlabs.com/guides/custom_facts.html in regards to > declaring External Facts using powershell. > > I''ve created a simple .ps1 file outputing a single key pair eg: Write-Host > "mykey=123456", however if I run Facter from the Command Prompt(with > puppet) my value isn''t present. > > Also if I run ''puppet apply MyModule.pp --verbose'' I don''t receive any > information about it attempting to load facts. > > I''ve also tried a simple txt file with no luck. > > I''m using Puppet 2.7.17 installed via chocolatey, could this be a > configuration issue, do I need to enable External Task parsing? > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Jay Benner
2013-Oct-10 22:48 UTC
[Puppet Users] Re: External Facts on Windows with Powershell
Did you figure this out? I am having the same trouble. On Tuesday, April 9, 2013 10:44:38 AM UTC-5, Grant Trevor wrote:> > I''m trying to follow the steps on > http://docs.puppetlabs.com/guides/custom_facts.html in regards to > declaring External Facts using powershell. > > I''ve created a simple .ps1 file outputing a single key pair eg: Write-Host > "mykey=123456", however if I run Facter from the Command Prompt(with > puppet) my value isn''t present. > > Also if I run ''puppet apply MyModule.pp --verbose'' I don''t receive any > information about it attempting to load facts. > > I''ve also tried a simple txt file with no luck. > > I''m using Puppet 2.7.17 installed via chocolatey, could this be a > configuration issue, do I need to enable External Task parsing? >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Josh Cooper
2013-Oct-11 18:19 UTC
Re: [Puppet Users] Re: External Facts on Windows with Powershell
On Thu, Oct 10, 2013 at 3:48 PM, Jay Benner <longrifle@gmail.com> wrote:> Did you figure this out? I am having the same trouble. > > > On Tuesday, April 9, 2013 10:44:38 AM UTC-5, Grant Trevor wrote: >> >> I''m trying to follow the steps on http://docs.puppetlabs.com/** >> guides/custom_facts.html<http://docs.puppetlabs.com/guides/custom_facts.html>in regards to >> declaring External Facts using powershell. >> >> I''ve created a simple .ps1 file outputing a single key pair eg: >> Write-Host "mykey=123456", however if I run Facter from the Command >> Prompt(with puppet) my value isn''t present. >> >> Also if I run ''puppet apply MyModule.pp --verbose'' I don''t receive any >> information about it attempting to load facts. >> >> I''ve also tried a simple txt file with no luck. >> >> I''m using Puppet 2.7.17 installed via chocolatey, could this be a >> configuration issue, do I need to enable External Task parsing? >> > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > > For more options, visit https://groups.google.com/groups/opt_out. >General external fact support was released in facter 1.7.0, however, executable external facts (.ps1, .bat, etc) do not work correctly on windows until facter 1.7.3[1]. Try using the latest puppet version[2]. Josh [1] http://projects.puppetlabs.com/issues/22077 [2] https://downloads.puppetlabs.com/windows/puppet-3.3.1.msi -- Josh Cooper Developer, Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Klavs Klavsen
2013-Oct-14 07:48 UTC
Re: [Puppet Users] Re: External Facts on Windows with Powershell
Also of note.. facts.d support is broken in windows 2003 :( (and it breaks puppet - so it won''t even run) - see http://projects.puppetlabs.com/issues/22622 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Josh Cooper
2013-Oct-14 17:30 UTC
Re: [Puppet Users] Re: External Facts on Windows with Powershell
Hi Klavs, On Mon, Oct 14, 2013 at 12:48 AM, Klavs Klavsen <klavs@enableit.dk> wrote:> Also of note.. facts.d support is broken in windows 2003 :( (and it breaks > puppet - so it won''t even run) - see > http://projects.puppetlabs.com/issues/22622 > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. >Bug #22622, if I understand correctly, is that facter (and puppet) can fail to run if there is an external executable fact that doesn''t return any output, and that it affects all versions of windows, not just 2003. If that''s not the case, please update the ticket with relevant details. Thanks, Josh -- Josh Cooper Developer, Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Klavs Klavsen
2013-Oct-15 12:48 UTC
Re: [Puppet Users] Re: External Facts on Windows with Powershell
Ticket updated :) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.