Hi Steve,
This is a long standing 'chicken and egg' situation with Puppet
installing dependencies for it's own providers. There was an issue I
thought I was watching, but I can't find it now to quote it to you.
People do different things: they either put up with the 2 pass approach,
or for more involved providers they write a Fact to say whether the
system the Agent is running on has the necessary requirements and then
selectively defines resources.
-Luke
On 16/04/12 22:55, Steve Roberts wrote:
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.
--
Luke Bigum
Information Systems
Ph: +44 (0) 20 3192 2520
luke.bigum@lmax.com |
http://www.lmax.comLMAX, Yellow Building, 1A Nicholas Road, London W11 4AN
FX and CFDs are leveraged products that can result in losses exceeding
your deposit. They are not suitable for everyone so please ensure you
fully understand the risks involved. The information in this email is not
directed at residents of the United States of America or any other
jurisdiction where trading in CFDs and/or FX is restricted or prohibited
by local laws or regulations.
The information in this email and any attachment is confidential and is
intended only for the named recipient(s). The email may not be disclosed
or used by any person other than the addressee, nor may it be copied in
any way. If you are not the intended recipient please notify the sender
immediately and delete any copies of this message. Any unauthorised
copying, disclosure or distribution of the material in this e-mail is
strictly forbidden.
LMAX operates a multilateral trading facility. Authorised and regulated
by the Financial Services Authority (firm registration number 509778) and
is registered in England and Wales (number 06505809).
Our registered address is Yellow Building, 1A Nicholas Road, London, W11
4AN.
--
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.