Thank you!
This is also working:
/usr/sbin/nginx -V 2>&1 | /bin/grep -oP "http-proxy-temp-path=.*?\s" |
/usr/bin/awk -F\'=\' {\'print $2\'}
среда, 19 марта 2014 г., 17:31:45 UTC+4 пользователь jcbollinger написал:
>
>
>
> On Wednesday, March 19, 2014 4:03:26 AM UTC-5, Roman Alekseev wrote:
>>
On Wednesday, March 19, 2014 4:03:26 AM UTC-5, Roman Alekseev wrote:
>
> 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
> |
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'} |
Hi,
I think that the best way is a custom fact.
Regards
El 19/03/2014 08:27, "Roman Alekseev" 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.arg
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