diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/bcd/manifests/ini.pp | 32 | ||||
-rw-r--r-- | modules/bcd/templates/sudoers.bcd | 6 |
2 files changed, 38 insertions, 0 deletions
diff --git a/modules/bcd/manifests/ini.pp b/modules/bcd/manifests/ini.pp new file mode 100644 index 00000000..07b4e073 --- /dev/null +++ b/modules/bcd/manifests/ini.pp @@ -0,0 +1,32 @@ +class bcd { + $bcd_login = 'bcd' + $bcd_home = '/home/bcd' + + class base { + include sudo + + buildsystem::sshuser { $bcd_login: + homedir => $bcd_home, + comment => "User for creating ISOs", + } + + package { bcd: + ensure => 'installed', + } + + file { "/etc/sudoers.d/bcd": + owner => root, + group => root, + mode => 440, + content => template("bcd/sudoers.bcd") + } + } + + define ssh_access($type, $key) { + ssh_authorized_key{$name: + type => $type, + key => $key, + user => $bcd_login, + } + } +} diff --git a/modules/bcd/templates/sudoers.bcd b/modules/bcd/templates/sudoers.bcd new file mode 100644 index 00000000..2c38fab5 --- /dev/null +++ b/modules/bcd/templates/sudoers.bcd @@ -0,0 +1,6 @@ +<%= bcd_login %> ALL=(root) NOPASSWD:/bin/mount, /bin/umount, \ +/usr/sbin/chroot, \ +/usr/sbin/urpmi, \ +/usr/sbin/urpmi.addmedia, \ +/usr/sbin/urpmi.removemedia, \ +/bin/rm |