I have a question hopefully someone here can help me out with. I have a module that I didn't write, I got it from the github. it's the postgres module. I'm running on CentOS 5. In the module there is this:
case $ensure { present: { exec { "Create $name postgres db": command => "/usr/bin/createdb $ownerstring $name", user => "postgres", unless => "/usr/bin/psql -l | grep '$name *|'" *** This line causes an error } } The *** line causes puppet to error out like so: debug: //Node[myhost.mydomain.com]/Postgres::Role[voiceob]/Exec[Create puser postgres role]: Executing check '/usr/bin/psql -c '\du' | grep 'puser *|'' debug: Executing '/usr/bin/psql -c '\du' | grep 'puser *|'' err: //Node[myhost.mydomain.com]/Postgres::Role[puser]/Exec[Create puser postgres role]: Failed to retrieve current state of resource: (This produces no output if the user doesn't exist in postgres.) Nothing more on the error line. Interestingly enough, if I remove the '|' (pipe) after the psql part of the command, it doesn't error. However, it doesn't do what I need it to do. I have tried it without the unless line and it works perfectly. Again, it doesn't do what I need it to do that way though. I have searched the message boards and wiki to no avail. Can any of you shed some light on why this wouldn't work? TIA Drew -- 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.