When I run with debug option i see "$" is not working inside puppet. I 
tried to escape but it is not working. 

Debug: Exec[file_system_cleanup](provider=posix): Executing check 'test `df 
-h / | tail -1 | awk '{print }' | sed 's/%//g'` -gt 20'
Debug: Executing: 'test `df -h / | tail -1 | awk '{print }' | sed 's/%//g'` 
-gt 20'

Thanks,

On Monday, February 29, 2016 at 2:20:25 PM UTC-5, [email protected] wrote:
>
> Hi All,
>
> I following code is not working. Not sure why. 
>
> exec { "file_system_cleanup":
>                 command => "touch /root/file_system_cleanup.log",
>                 path    => '/bin/:/sbin/:/usr/bin/:/usr/sbin',
>                 onlyif  => "test `df -h / | tail -1 | awk '{print $5}' | 
> sed 's/%//g'` -gt 20",
>          }
>
>
>
> Thanks,
>

-- 
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/d1fe5cff-616d-40e9-8767-6393da20e834%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to