I know I need to have ruby-shadow installed to get puppet to be able
to manage shadow file based passwords.

so tried to code that up in a puppet manifest like this:
=======================================
class strobenet {

  package { 'ruby-shadow':
    ensure => 'present',
  }

  user { 'tuser':
    ensure           => 'present',
    comment          => 'Test User',
    gid              => '302',
    home             => '/home/tuser',
    password         => '***',
    password_max_age => '99000',
    password_min_age => '5',
    shell            => '/bin/tcsh',
    uid              => '302',
  }
  group { 'tuser':
    ensure => 'present',
    gid    => '302',
  }

  Package['ruby-shadow'] -> User <| |>
}
=======================================

the problem is that when it runs the first time the puppet User
provider says it can't handle manages_passwords and
manages_password_age during init and so clips those attributes.

Then it goes to apply the actual resources and does the package first,
then the user.

But since the provider has already clipped the attributes they don't
get set in the first run.

when run a second time the attributes do get set correctly, but that
seems a bit kludgy to have to run puppet twice to get the desired
affect.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to