How do I use saz-sudo puppet module to deploy my own sudoers file with hiera?

Posted by mr.zog on Server Fault See other posts from Server Fault or by mr.zog
Published on 2014-05-28T00:14:01Z Indexed on 2014/05/28 3:32 UTC
Read the original article Hit count: 466

Filed under:
|
|

I have saz-sudo installed and have created a site_sudo module based (I hope) on it. Here's what I have in my site_sudo/manifest/init.pp file:

class { 'site_sudo': }
    sudo::conf { 'web':
      source => 'puppet:///files/etc/sudoers',
    }
    sudo::conf { 'syseng':
      priority => 10,
      content  => "%sysadm ALL=(ALL) NOPASSWD: ALL",
    }

include sudo

No matter what I do, the sudoers file on the target is always overwritten with the sudoers.rhel6 file from saz-sudo module.

I'm using common.yaml too:

classes:
  - site_sudo

© Server Fault or respective owner

Related posts about puppet

Related posts about sudoers