Have you checked out what that command does when you run it from the command line? Does it complete successfully? What is the return code?
Possibility 1: Your version of Puppet (you didn't say which) is not correctly preserving the inner single quotation marks around '$name *|'. This seems unlikely, but I'm having trouble seeing why else the command would actually fail, as opposed to returning *some* result, even if it were the wrong one. Michael's suggestion of changing the output format might provide a workaround in that case. Alternatively, if you're not on the latest Puppet then you could try upgrading. Possibility 2: (?) The fact that the command runs without error when you remove the (pipe) rules out pretty much everything else I came up with. Do note, by the way, that the 'unless' command is buggy in any event, because it will return the wrong result when there is an existing database with a name suffix that matches your database's name. Depending on the psql output details, there may be other possibilities for unintended matches. That in itself would be an excellent reason to look into taking tighter control of the psql output format, or else inserting an additional filter between psql and grep (which could be another grep). If your database name contains regex metacharacters (e.g. '.'), then that also would present a possibility of unintended matches. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.