Hi,
I created fact but it doesn't work. What did I make wrong?
*# nginx_arg.rbFacter.add("nginx_arg") do setcode do
Facter::Util::Resolution.exec("/usr/sbin/nginx -V 2> /etc/puppet/nginx.args
| /bin/cat /etc/puppet/nginx.args | /usr/bin/awk
-F'--http-proxy-temp-path=' {'print $2'} | /usr/bin/awk {'print $1'} |
/bin/grep '\/'") endend*
Thanks.
среда, 19 марта 2014 г., 12:13:16 UTC+4 пользователь Jose Luis Ledesma
написал:
>
> Hi,
>
> I think that the best way is a custom fact.
>
> Regards
> El 19/03/2014 08:27, "Roman Alekseev" <[email protected] <javascript:>>
> escribió:
>
>> Hello,
>>
>> What is the best way in puppet to create a variable as result of command
>> below:
>> *$nginx_dir=`/usr/sbin/nginx -V 2> /etc/puppet/nginx.args | /bin/cat
>> /etc/puppet/nginx.args | /usr/bin/awk -F'--http-proxy-temp-path=' {'print
>> $2'} | /usr/bin/awk {'print $1'} | /bin/grep '\/'`*
>>
>> Any advices will be appreciated.
>>
>> --
>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/7211e50a-32db-4c68-953e-164edecc1932%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/7211e50a-32db-4c68-953e-164edecc1932%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/d4c7cbba-4b5a-4f60-9fba-3c0eba2bd847%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.