Glad to hear it worked. On May 24, 2011, at 11:40 PM, treydock wrote:
> I don't have that directory. However I came across this module > https://github.com/camptocamp/puppet-sudo which among many things > enlightened me to the new feature in sudo-1.7.2+ of using includedir > and /etc/sudoers.d that you mentioned. Everything I am using is > defined there except now my backuppc_client module has this... > > sudo::directive { "backuppc": > ensure => present, > source => "puppet:///modules/backuppc_client/ > backuppc_sudocmd", > } > > The backuppc_sudocmd file contains the sudo lines. > > Thanks! > - Trey > > On May 24, 11:00 pm, Patrick <[email protected]> wrote: >> On May 24, 2011, at 7:58 PM, treydock wrote: >> >> >> >> >> >> >> >> >> >>> I have a similar problem I can't seem to solve...here's what I'm >>> trying to do. >> >>> I have two modules, backuppc_client and sudo. Right now I have a node >>> variable that I assign to each node that is used in the sudo module's >>> template to add the necessary entry. For example.... >> >>> ---manifests/node.pp >>> node 'client1' { >>> $backuppc_sudocmd = "backupuser ALL=NOPASSWD: /usr/bin/rsync" >> >>> include baseclass >>> include backuppc_client::base >>> } >> >>> ---modules/sudo/templates/sudoers.erb has... >> >>> <% if has_variable?("backuppc_sudocmd") then %> >>> <%= backuppc_sudocmd %> >>> <% end %> >> >>> Is there a way for the sudo module to find out or be aware if a client >>> has the "include backuppc_client" in their definition? Basically I'd >>> like the backuppc_client module's to alter the contents of sudoers >>> file which I can't imagine how to do as sudoers is defined by the sudo >>> module which is part of baseclass and applied to all systems. >> >> First, do you have a "/etc/sudoers.d/" directory? That would make things >> much easier. >> >> If not, you might want to look into "puppet_concat" which allows you to >> build "fragments" that can be templated to build your file. > > -- > 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. > -- 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.
