hello,
> Someone on this list seemed quite certain that modules where executed > in the order they were imported, which turned out to be wrong. > > At the moment I have a few modules tagged as 'bootstrap'. The initial > puppet.conf on the client has 'tags=bootstrap' in it, so that when > puppet runs for the first time, it only applies those modules. > There's also a puppet module which over writes the puppet.conf and removes > the tags=bootstrap line so that the next time it runs, it grabs > everything else. > > This approach isn't perfect though. I'd really like to be able to > execute the modules within the bootstrap phase within a specific > order, so that, say, ntp gets done first followed by LDAP, and so on. > If LDAP is half implemented, and puppet tries to add a user through > another module, for example, the useradd command just locks up. > Within the bootstrapped modules currently I have a horrible mess of > unmaintainable requires => statements, that are just going to get > harder to maintain as times goes on. I'm afraid to touch it now, for > fear of what will break. If you use the method I highlighted earlier with wrapper classes this becomes trivial class bootstrap { tag "bootstrap" include ldap include yum::repos } class puppet::config { tag "bootstrap" file{"/etc/puppet/puppet.conf": require => Class["bootstrap"] . . } } now you can keep things simple, you can still just run the bootstrap tag and the bonus is all the stuff in the 'bootstrap' class will be 100% by the time your config file goes out. Inside the bootstrap class there are very fewer things that are truly order dependent, if you really need yum before ldap then just do a single require there. You have very few require => lines and ordering is predictable for the few things where it matters, later on ordering is less important. Take a hypothetical 'monitoring should be done after apache is installed' - it really doesnt matter that much if say apache is setup after your monitoring since at the end of the run both will be there anyway. Installing apache does not fail if monitoring isnt there, it just seems better in your mind if they happen in a given order. -- R.I.Pienaar -- 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.