On Wednesday, December 18, 2013 3:40:21 AM UTC-6, shlo....@gmail.com wrote: > > > I did not understand where exactly put the test line. I tried: > exec { "ls": > command => test $(grep -c aa /tmp/aao) -gt 0 > returns => 1, > path => "/usr/bin:/usr/sbin:/bin", > } > I got the error: > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Could not match $(grep at /etc/puppet/.../init.pp:4 on node agent.... > > Add
provider => 'sh' to the exec. Or, better, the command grep -q 'aa' /tmp/aao better and more simply matches your intent: it exits 0 if any match is found, or nonzero otherwise. No need for wc. John -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6ac45a8a-9e1d-455d-ad69-8778cd98df18%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.