Hello, I''m a puppet newbie and I''m having trouble getting my virtual user setup to work. Can someone please tell me what''s wrong with this setup? # virtual.pp # class virtual_users::virtual { @group { "users": gid => "100", ensure => present } @user { "lmoore": password => "$1$WLx?v4oo#ajnxqrNG?ECT?00fh?P?H1", uid => "8050", comment => "Lucy Moore", gid => "100", home => "/home/lmoore", ensure => "present", shell => "/usr/bin/bash", managehome => true, } } # unixadmins.pp # # Realize the members of the Unix team and include any contractors class virtual_users::unixadmins inherits virtual_users::virtual { # Realize our team members realize( Group["users"], ) realize( User["lmoore"], ) } #init.pp #virtual_users modules include "virtual" include "unixadmins" # modules.pp # Import all modules to initialize naming scope. # (funny thing is I can include classes contained in these # even if I did not import them previously) import "virtual_users" # /etc/puppet/manifests/nodes.pp node /sl11lab0[123]-vhost/ { # puppet lab nodes include "common::suse" include "git" #include "user_login" include "virtual_users::unixadmins" } Thanks, Maria -- 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, Can''t test this, but isn''t this declaration around the wrong way? # virtual.pp # class virtual_users::virtual I would expect: # virtual.pp # class virtual::virtual_users As I say, can''t test before I reply. Cheers On 31/03/2011, at 7:33, MariaS <maria.thompson-saeb@ucop.edu> wrote:> # virtual.pp > # > class virtual_users::virtual-- 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, no, the namings scheme is in fact perfectly fine. That is why you should *not* import the modules. Since you''re using sane naming conventions, your classes can be autoloaded. It is good practice to not use any import statements whatsoever (as far as modules are concerned). The only problem I can easily discern is that the password hash is double quoted, and puppet will try and substitute variables. Use single quotes or escape the dollar signs. What''s the problem you''re facing with this manifest? Cheers, Felix On 03/31/2011 01:40 AM, Denmat wrote:> Hi, > > Can''t test this, but isn''t this declaration around the wrong way? > > # virtual.pp > # > class virtual_users::virtual > > I would expect: > > # virtual.pp > # > class virtual::virtual_users > > As I say, can''t test before I reply. > > Cheers > > On 31/03/2011, at 7:33, MariaS <maria.thompson-saeb@ucop.edu > <mailto:maria.thompson-saeb@ucop.edu>> wrote: > >> # virtual.pp >> # >> class virtual_users::virtual > > -- > 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.-- 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.
On Mar 31, 2:36 am, Felix Frank <felix.fr...@alumni.tu-berlin.de> wrote:> The only problem I can easily discern is that the password hash is > double quoted, and puppet will try and substitute variables. Use single > quotes or escape the dollar signs.Yep, that would be my guess about what the problem is. I note also, however, that the "managehome" and "password" properties only work with some providers (approximately, only on some operating systems). *Probably* they both work on your system, but we can''t be sure without knowing which system that is (or indeed, anything specific about the actual error). John -- 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.
Maria Thompson-Saeb
2011-Mar-31 17:57 UTC
Re: [Puppet Users] trouble with my virtual user setup
Hi, There is something missing because this manifest will not create my test user. Thanks for your suggestions. .....Maria On 3/30/11 11:36 PM, "Felix Frank" <felix.frank@alumni.tu-berlin.de> wrote:> Hi, > > no, the namings scheme is in fact perfectly fine. > > That is why you should *not* import the modules. Since you''re using sane > naming conventions, your classes can be autoloaded. > It is good practice to not use any import statements whatsoever (as far > as modules are concerned). > > The only problem I can easily discern is that the password hash is > double quoted, and puppet will try and substitute variables. Use single > quotes or escape the dollar signs. > > What''s the problem you''re facing with this manifest? > > Cheers, > Felix > > On 03/31/2011 01:40 AM, Denmat wrote: >> > Hi, >> > >> > Can''t test this, but isn''t this declaration around the wrong way? >> > >> > # virtual.pp >> > # >> > class virtual_users::virtual >> > >> > I would expect: >> > >> > # virtual.pp >> > # >> > class virtual::virtual_users >> > >> > As I say, can''t test before I reply. >> > >> > Cheers >> > >> > On 31/03/2011, at 7:33, MariaS <maria.thompson-saeb@ucop.edu >> > <mailto:maria.thompson-saeb@ucop.edu>> wrote: >> > >>> >> # virtual.pp >>> >> # >>> >> class virtual_users::virtual >> > >> > -- >> > 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. > > -- > 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. > >-- 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.
On Mar 31, 12:57 pm, Maria Thompson-Saeb <maria.thompson- s...@ucop.edu> wrote:> There is something missing because this manifest will not create my test > user. Thanks for your suggestions.There are many possibilities. Running puppetd with debug output turned on is likely to help in determining which applies: /usr/sbin/puppetd --test --debug John -- 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.
Maria Thompson-Saeb
2011-Mar-31 23:00 UTC
Re: [Puppet Users] Re: trouble with my virtual user setup
Thanks, that helped. My module appears to run now but not until the second or third attempt with no changes being made. err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class virtual at /data/puppet/test/modules/virtual_users/manifests/init.pp:5 on node ......Maria On 3/31/11 1:15 PM, "jcbollinger" <John.Bollinger@stJude.org> wrote:> > > > On Mar 31, 12:57 pm, Maria Thompson-Saeb <maria.thompson- > s...@ucop.edu> wrote: >> > There is something missing because this manifest will not create my test >> > user. Thanks for your suggestions. > > There are many possibilities. Running puppetd with debug output > turned on is likely to help in determining which applies: > > /usr/sbin/puppetd --test --debug > > > John > > -- > 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. > >-- 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, try these steps first: 1. check $vardir/state/classes.txt on your client. It should contain your unixadmins class. Otherwise you have an inclusion problem 2. run puppet agent --test --evaltrace and look for your user/group. If they don''t appear at all, something else is fishy. HTH, Felix On 03/31/2011 07:57 PM, Maria Thompson-Saeb wrote:> Hi, > > There is something missing because this manifest will not create my test > user. Thanks for your suggestions.-- 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.
On Mar 31, 6:00 pm, Maria Thompson-Saeb <maria.thompson-s...@ucop.edu> wrote:> Thanks, that helped. My module appears to run now but not until the second > or third attempt with no changes being made. > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Could not find class virtual at > /data/puppet/test/modules/virtual_users/manifests/init.pp:5 on nodeWell that looks like a problem with the layout of and/or access control for your manifest files. In addition to init.pp, directory / data/puppet/test/modules/virtual_users/manifests/ should contain your virtual.pp and unixadmins.pp files. All those files must be readable by the puppetmaster at runtime. In addition, you could try making the module''s init.pp manifest include the classes by their fully-qualified names (virtual_users::virtual and virtual_users::unixadmins), or better, have it not include either, since it doesn''t appear that it needs to do. Also, though these probably are not related to your current problem: 1) If you set up your modules correctly, you should not ever need to use an import statement. It looks and sounds like you are indeed setting them up correctly, so I recommend you remove the one import statement you have. 2) Classes should inherit from other classes *only* for the purpose of overriding properties of the parent classes'' resources. For simply including the same resources, classes should *include* other classes, not inherit from them. In your case, this applies to your virtual_users::unixadmins class. 3) Before you develop this module further, I recommend changing its name to simply "users", or something else more descriptive of its role. The "virtual" part is an implementation detail. Consider that the virtual_users::unixadmins class provides *concrete* users and groups, an it seems likely that classes you add to the module will dothe same. Such a renaming would have no technical impact (if done correctly), but good naming matters more than you might think. John -- 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.