Solved:

****************************
# nginx_arg.rb

Facter.add("nginx_arg") do
  setcode do
        Facter::Util::Resolution.exec('/usr/sbin/nginx -V 2>&1  | /bin/grep 
-oP "http-proxy-temp-path=.*?\s" | /usr/bin/awk -F\'=\' {\'print $2\'}')
  end
end
****************************

среда, 19 марта 2014 г., 11:27:15 UTC+4 пользователь Roman Alekseev написал:
>
> 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c7fec9b2-cdad-4076-a2c9-8b44e8fd94c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to