Hey everyone, I''m trying to get my first puppet configuration set up and I was hoping to find some help with issues I''ve been having lately with ordering. Essentially I''m trying to get a postgres 9.0 server set up on a ubuntu 10.04 machine which will have multiple users and databases defined by each app''s module. I''ve used this guy''s repository as a starting point: http://github.com/uggedal/puppet-module-postgresql The issue i''m having is that I cannot seem to define users or databases because the Exec resource which creates the user wants to execute before the postgres server is even installed. Here is the specific error: will@puppet-scratchpad:~$ sudo puppetd --onetime --no-daemonize -- verbose --certname developer The interpreter parameter to ''setcode'' is deprecated and will be removed in a future version. info: Caching catalog for developer err: Failed to apply catalog: Parameter unless failed: ''psql -ltA | grep ''^myapp-production|'''' is not qualified and no path was specified. Please qualify the command or specify a path. My node definition looks like this: https://gist.github.com/e320ba241a4deb95faa4 The mycompany::postgres::server definition looks like this: https://gist.github.com/372ef71a74bc7e3d53f5 And finally the definition of myapp is here: https://gist.github.com/0e16825ce563f7b79968 For definitions of the postgres module see the github link i provided above - the code we have really hasn''t changed that much at all from the original (a few configuration settings is all, really). I''ve left some stuff out just to be clear and short but feel free to ask for any more information - I can readily provide it. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi, On 10/27/2011 08:34 PM, Kabal458 wrote:> the Exec resource which creates the user wants to > execute before the postgres server is even installed.you typically don''t want to create users using "exec", you''d want to use the "user" resource type instead. Either way, the resource that is responsible for the user account should "require" the class that installs the software. HTH, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Yeah I suppose you could create a UNIX user instead of using exec to create a Postgres role but either way the ordering issue is still there. In fact if you look at https://github.com/uggedal/puppet-module-postgresql/blob/master/manifests/user.pp on line 11 you can see that the Exec resource requires the postgres::server class but from the output I posted it seems to ignore this require parameter. On Oct 28, 3:33 am, Felix Frank <felix.fr...@alumni.tu-berlin.de> wrote:> Hi, > > On 10/27/2011 08:34 PM, Kabal458 wrote: > > > the Exec resource which creates the user wants to > > execute before the postgres server is even installed. > > you typically don''t want to create users using "exec", you''d want to use > the "user" resource type instead. > > Either way, the resource that is responsible for the user account should > "require" the class that installs the software. > > HTH, > Felix-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi, On 10/27/2011 08:34 PM, Kabal458 wrote:> err: Failed to apply catalog: Parameter unless failed: ''psql -ltA | > grep ''^myapp-production|'''' is not qualified and no path was specified. > Please qualify the command or specify a path.my bad: you need to specify search paths in your exec resource (or use calls by absolute paths, which I usually prefer). This isn''t an ordering problem, the issue arises even before puppet tries to do anything. HTH, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Wow, I''m amazed it was that simple. This worked amazingly! thank you very much for helping! On Oct 28, 9:58 am, Felix Frank <felix.fr...@alumni.tu-berlin.de> wrote:> Hi, > > On 10/27/2011 08:34 PM, Kabal458 wrote: > > > err: Failed to apply catalog: Parameter unless failed: ''psql -ltA | > > grep ''^myapp-production|'''' is not qualified and no path was specified. > > Please qualify the command or specify a path. > > my bad: you need to specify search paths in your exec resource (or use > calls by absolute paths, which I usually prefer). > > This isn''t an ordering problem, the issue arises even before puppet > tries to do anything. > > HTH, > Felix-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.