aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/buildsystem/manifests/init.pp6
-rw-r--r--modules/buildsystem/templates/sudoers.maintdb1
2 files changed, 7 insertions, 0 deletions
diff --git a/modules/buildsystem/manifests/init.pp b/modules/buildsystem/manifests/init.pp
index dc9c3d56..ef330dcd 100644
--- a/modules/buildsystem/manifests/init.pp
+++ b/modules/buildsystem/manifests/init.pp
@@ -148,6 +148,7 @@ class buildsystem {
}
class maintdb {
+ include sudo
$maintdb_login = "maintdb"
$maintdb_homedir = "/var/lib/maintdb"
$maintdb_dbdir = "$maintdb_homedir/db"
@@ -185,6 +186,11 @@ class buildsystem {
mode => 755,
content => template("buildsystem/wrapper.maintdb")
}
+
+ sudo::sudoers_config { "maintdb":
+ content => template("buildsystem/sudoers.maintdb")
+ }
+
}
class mgarepo {
diff --git a/modules/buildsystem/templates/sudoers.maintdb b/modules/buildsystem/templates/sudoers.maintdb
new file mode 100644
index 00000000..8579f18f
--- /dev/null
+++ b/modules/buildsystem/templates/sudoers.maintdb
@@ -0,0 +1 @@
+<%= packagers_group %> ALL =(<%= maintdb_login %>) NOPASSWD: <%= maintdb_binpath %>