diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-01-12 16:42:08 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-01-12 16:42:08 +0000 |
commit | 4b7555c3ab1acc64350d04bfdd4f9858d4d5679b (patch) | |
tree | 3cab07f7cde735903e8d29fc0d7ba6be1fb3d68a /modules/bcd | |
parent | 9002fb045e482c870587486955034f32074289e3 (diff) | |
download | puppet-4b7555c3ab1acc64350d04bfdd4f9858d4d5679b.tar puppet-4b7555c3ab1acc64350d04bfdd4f9858d4d5679b.tar.gz puppet-4b7555c3ab1acc64350d04bfdd4f9858d4d5679b.tar.bz2 puppet-4b7555c3ab1acc64350d04bfdd4f9858d4d5679b.tar.xz puppet-4b7555c3ab1acc64350d04bfdd4f9858d4d5679b.zip |
add bcd module
Diffstat (limited to 'modules/bcd')
-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 |