On Wed, Jul 29, 2009 at 1:57 AM, David Schmitt<da...@dasz.at> wrote: > > Asif Iqbal wrote: >> So I think I should start small and simple and it may grow to a >> solution that will be really useful to others. >> >> Lets start w/ real basic. >> >> I have 300 hosts. I like a push a user to about 100 hosts (dns >> resolver type hosts) out of 300 total. >> >> How do I set that up within puppet ? > > The very simplest stuff: > > | node "dns1", ..., "dns100" { > | user { "foo": ... } > | }
I tried to expand on it and I have setup a recipe which is not really working yet node basenode { $userlist = [ "user1", "user2", "user3", .. , "user50" ] $passwd = [ "hashkey1", "hashkey2", .. , "hashkey50" ] $fullname = [ "fname1 lname1", "fname2 lname2",... , "fname50 lname50" ] $uids = [ "101", "102", ... , "150" ] user { $userlist: ensure => "present", uid => $uids, gid => "1", comment => $fullname, home => "/export/home/$userlist", password => $passwd, shell => "/bin/bash", managehome => "true", } } node "node01" inherits basenode {} .... node "node100" inherits basenode {} > > That's of course very trivial. The next steps would be to put the user > into his own class/module where you can encapsulate the user and his > environment (ssh key, shell configuration, ...) and use an external > nodes classifier[1] to find your nodes instead of typing them all out. > > You can read many more examples on the wiki [2] and [3]. Also look at > the references linked from the documentation main page[4]. > > > > Regards, DavidS > > > > [1] http://reductivelabs.com/trac/puppet/wiki/ExternalNodes > [2] http://reductivelabs.com/trac/puppet/wiki/PuppetModules > [3] http://reductivelabs.com/trac/puppet/wiki/Recipes > [4] http://reductivelabs.com/trac/puppet/wiki/DocumentationStart > > > > > > > > -- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---