diff options
author | Nicolas Vigier <boklm@mageia.org> | 2012-12-11 11:33:34 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2012-12-11 11:33:34 +0000 |
commit | 813b410e0586243667434a9943e171276d740030 (patch) | |
tree | 841e3f8f87ec53a5df017b71c75de7d264a42f6b | |
parent | 1432399b47a47dc2a026c01755aa696f37997a15 (diff) | |
download | puppet-813b410e0586243667434a9943e171276d740030.tar puppet-813b410e0586243667434a9943e171276d740030.tar.gz puppet-813b410e0586243667434a9943e171276d740030.tar.bz2 puppet-813b410e0586243667434a9943e171276d740030.tar.xz puppet-813b410e0586243667434a9943e171276d740030.zip |
Create buildsystem::var::signbot
All options for buildsystem::signbot are now stored in
buildsystem::var::signbot.
4 files changed, 16 insertions, 15 deletions
diff --git a/modules/buildsystem/manifests/signbot.pp b/modules/buildsystem/manifests/signbot.pp index 5e5db5d9..5c3e222a 100644 --- a/modules/buildsystem/manifests/signbot.pp +++ b/modules/buildsystem/manifests/signbot.pp @@ -1,14 +1,10 @@ class buildsystem::signbot { include buildsystem::scheduler::var - $login = 'signbot' - $home_dir = "/var/lib/$login" - $sign_keydir = "$home_dir/keys" - # FIXME: maybe keyid should be defined at an other place - $keyid = '80420F66' + include buildsystem::var::signbot $sched_login = $buildsystem::scheduler::var::login - sshuser { $login: - homedir => $home_dir, + sshuser { $buildsystem::var::signbot::login: + homedir => $buildsystem::var::signbot::home_dir, comment => 'System user used to sign packages', groups => [$sched_login], } @@ -18,9 +14,9 @@ class buildsystem::signbot { #FIXME there should be a variable somewhere to change # the name of the distribution key_name => 'Mageia Packages', - login => $login, - batchdir => "$home_dir/batches", - keydir => $sign_keydir, + login => $buildsystem::var::signbot::login, + batchdir => "${buildsystem::var::signbot::home_dir}/batches", + keydir => $buildsystem::var::signbot::sign_keydir, } sudo::sudoers_config { 'signpackage': diff --git a/modules/buildsystem/manifests/var/signbot.pp b/modules/buildsystem/manifests/var/signbot.pp new file mode 100644 index 00000000..f9fac04f --- /dev/null +++ b/modules/buildsystem/manifests/var/signbot.pp @@ -0,0 +1,5 @@ +class buildsystem::var::signbot($keyid = '80420F66') { + $login = 'signbot' + $home_dir = "/var/lib/$login" + $sign_keydir = "$home_dir/keys" +} diff --git a/modules/buildsystem/templates/signbot/sudoers.signpackage b/modules/buildsystem/templates/signbot/sudoers.signpackage index 05653d30..2dfc30a1 100644 --- a/modules/buildsystem/templates/signbot/sudoers.signpackage +++ b/modules/buildsystem/templates/signbot/sudoers.signpackage @@ -1,2 +1,2 @@ -<%= sched_login %> ALL =(<%= login %>) NOPASSWD: /usr/local/bin/mga-signpackage -<%= sched_login %> ALL =(<%= login %>) NOPASSWD: /usr/local/bin/sign-check-package +<%= sched_login %> ALL =(<%= scope.lookupvar('buildsystem::var::signbot::login') %>) NOPASSWD: /usr/local/bin/mga-signpackage +<%= sched_login %> ALL =(<%= scope.lookupvar('buildsystem::var::signbot::login') %>) NOPASSWD: /usr/local/bin/sign-check-package diff --git a/modules/buildsystem/templates/youri/submit-upload.conf b/modules/buildsystem/templates/youri/submit-upload.conf index 879296cb..bab096da 100644 --- a/modules/buildsystem/templates/youri/submit-upload.conf +++ b/modules/buildsystem/templates/youri/submit-upload.conf @@ -295,9 +295,9 @@ actions: sign: class: Youri::Submit::Action::Sign options: - signuser: <%= scope.lookupvar('buildsystem::signbot::login') %> - path: <%= scope.lookupvar('buildsystem::signbot::sign_keydir') %> - name: <%= scope.lookupvar('buildsystem::signbot::keyid') %> + signuser: <%= scope.lookupvar('buildsystem::var::signbot::login') %> + path: <%= scope.lookupvar('buildsystem::var::signbot::sign_keydir') %> + name: <%= scope.lookupvar('buildsystem::var::signbot::keyid') %> signscript: /usr/local/bin/sign-check-package unpack_gfxboot_theme: |