aboutsummaryrefslogtreecommitdiffstats
path: root/modules/draklive
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2011-03-15 12:14:51 +0000
committerOlivier Blin <blino@mageia.org>2011-03-15 12:14:51 +0000
commit32e5989eaccf7122ef24d0a114a981a16a452ee6 (patch)
tree9bd3481bf5621d432d8dd435fb3c8fac2a61b4f2 /modules/draklive
parentb4df85c13843e392fb309d057e8b201c4aafd1fc (diff)
downloadpuppet-32e5989eaccf7122ef24d0a114a981a16a452ee6.tar
puppet-32e5989eaccf7122ef24d0a114a981a16a452ee6.tar.gz
puppet-32e5989eaccf7122ef24d0a114a981a16a452ee6.tar.bz2
puppet-32e5989eaccf7122ef24d0a114a981a16a452ee6.tar.xz
puppet-32e5989eaccf7122ef24d0a114a981a16a452ee6.zip
add draklive on rabbit and allow iso makers to run it
Diffstat (limited to 'modules/draklive')
-rw-r--r--modules/draklive/manifests/init.pp32
-rw-r--r--modules/draklive/templates/sudoers.draklive2
2 files changed, 34 insertions, 0 deletions
diff --git a/modules/draklive/manifests/init.pp b/modules/draklive/manifests/init.pp
new file mode 100644
index 00000000..974a491e
--- /dev/null
+++ b/modules/draklive/manifests/init.pp
@@ -0,0 +1,32 @@
+class draklive {
+ class variable {
+ $draklive_login = 'draklive
+ $draklive_home = '/home/draklive'
+ $isomakers_group = 'mga-iso_makers'
+ }
+
+ class base inherits variable {
+ include sudo
+
+ buildsystem::sshuser { $draklive_login:
+ homedir => $draklive_home,
+ comment => "User for creating live ISOs",
+ }
+
+ package { draklive:
+ ensure => 'installed',
+ }
+
+ sudo::sudoers_config { "draklive":
+ content => template("draklive/sudoers.draklive")
+ }
+
+ file { "/var/lib/draklive":
+ ensure => directory,
+ owner => $draklive_login,
+ group => $draklive_login,
+ mode => 755,
+ }
+
+ }
+}
diff --git a/modules/draklive/templates/sudoers.draklive b/modules/draklive/templates/sudoers.draklive
new file mode 100644
index 00000000..474f903f
--- /dev/null
+++ b/modules/draklive/templates/sudoers.draklive
@@ -0,0 +1,2 @@
+<%= draklive_login %> ALL=(root) NOPASSWD: /usr/bin/draklive
+%<%= isomakers_group %> ALL=(<%= draklive_login %>) SETENV: NOPASSWD: ALL