Hi guys, I realized that If I make the file udp_status.rb and I put on 
D:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter, that's where I 
installed puppet from the MSI file, and I use the Powershell script that I 
made, I got the value that I expect when I run facter:

D:\>facter udp_status
true

Now, My question will be: How can I use thi fact on a resource exec, Is 
this possible?, I tried using with onlyif => "$udp_status" but I got 
several errors about convertions and another stuffs...

What would be the correct way to use a fact on a resource EXEC on ​​windows?

any help would be appreciated

best regards


On Thursday, May 10, 2012 11:40:15 AM UTC-4, mparrad wrote:
>
> Hi guys, 
> I'm trying to define a custom fact on windows puppet agent, I'm using 
> the version 2.7.14. I made a powershell that checks for the state of a 
> service and return true or false. 
> If I execute it on powershell I got this: 
>
> PS C:\programdata\PuppetLabs\facter\ext> .\udp_status.ps1 
> udp_status=true 
>
> But If I ran facter I didn't see the facter and value for this custom 
> fact.... 
>
> I put the .ps1 file on C:\programdata\PuppetLabs\facter\ext but  I can't 
> see the value  for the fact... 
>
> What am I doing wrong?.... 
>
> thank you in advance... 
>
> Regards 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/MQR3kXNa93UJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to