Am Montag, 29. Februar 2016 20:20:25 UTC+1 schrieb [email protected]: > > 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", > } > > you need to escape $ signs or puppet will replace $5 with probably an empty string.
https://docs.puppetlabs.com/puppet/latest/reference/lang_data_string.html#escape-sequences - Thomas -- 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/020c7283-a183-4d37-9460-209318875dc2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
