You learn from use one of these:
http://forge.puppetlabs.com/modules?q=sudo
On Wed, Aug 29, 2012 at 02:13:34PM -0700, Tony Caffe wrote:
> I understand but that is not what I asked for help. I would like some help
> on making or writing the code needed to add users to visudo.
> On Wednesday, August 29, 2012 1:34:35 PM UTC-7, Ygor wrote:
>
> First suggestion:
>
> Use a group name ( like "wheel" ) and declare the sudo privileges to the
> group.
> Then all you need do is add that group in the "groups" parameter for
> puppet type user.
>
> On Aug 29, 2012, at 11:31 AM, Tony Caffe wrote:
>
> > Hi,
> >
> > I am trying to get puppet going on CentOS 6.3 and I got it installed
> and running. I want to create good manifests for basic stuff. I know I
> will learn more as I go but I am new to programming in general and
> puppet code. I have puppet master install on 1 cloud server and a client
> test puppet on another cloud server. I was able to run this code
> correctly. Now I want to make it better.
> > Here is what I have so far for my Push to add users to my nodes.
> >
> > site.pp: (I know its short lol)
> >
> > node 'puppet-client' {
> > import "classes/adduser.pp"
> > }
> >
> >
> > adduser.pp located in /etc/puppet/manifests/classes/
> >
> > define custom_user($passwd) {
> > user { "${name}":
> > ensure => present,
> > password => $passwd,
> > shell => "/bin/bash",
> > managehome => true,
> > }
> > }
> > custom_user {
> > "anthony":
> > passwd => 'Removed real hash here',
> > }
> > custom_user {
> > "admin":
> > passwd => 'Hash for password gone',
> > }
> > custom_user {
> > "luca":
> > passwd => 'My Password Hash Here',
> > }
> >
> >
> > So I am testing on a test-only server till I get the hang of it. So I
> have many cloud servers and need to be able to add my admin users. I
> need help now to modify /etc/sudoers or visudo and add these people to
> the doc with ALL=(ALL) ALL
> >
> > Please help me. I know I need to add a template and also a module of
> my own. I mainly need help with code and learning to build off this for
> future system changes. Please help me keep this simple and dumb-down
> lol. FYI - After this I want to start on Apache and editing the config
> and setting up new servers from an image. This is more practical and
> important to start with.
> >
> > Thanks all.
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> > To view this discussion on the web visit
> [1]https://groups.google.com/d/msg/puppet-users/-/k7r-BpgI4s4J.
> > To post to this group, send email to [2][email protected].
> > To unsubscribe from this group, send email to
> [3][email protected].
> > For more options, visit this group at
> [4]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 view this discussion on the web visit
> [5]https://groups.google.com/d/msg/puppet-users/-/ebP58zFazv0J.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
> References
>
> Visible links
> 1. https://groups.google.com/d/msg/puppet-users/-/k7r-BpgI4s4J
> 2. javascript:
> 3. javascript:
> 4. http://groups.google.com/group/puppet-users?hl=en
> 5. https://groups.google.com/d/msg/puppet-users/-/ebP58zFazv0J
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.