diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-05-22 22:17:02 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-05-22 22:17:02 +0000 |
commit | f2c7b7e17aa798e20f5285c2e6949283e47297a2 (patch) | |
tree | 57443a99299b97fae119b7e45e3b4cd7fc203e9a | |
parent | 77a70999df1bd4e67aadb02bd673449beae124b8 (diff) | |
download | puppet-f2c7b7e17aa798e20f5285c2e6949283e47297a2.tar puppet-f2c7b7e17aa798e20f5285c2e6949283e47297a2.tar.gz puppet-f2c7b7e17aa798e20f5285c2e6949283e47297a2.tar.bz2 puppet-f2c7b7e17aa798e20f5285c2e6949283e47297a2.tar.xz puppet-f2c7b7e17aa798e20f5285c2e6949283e47297a2.zip |
buildsystem: move groups definitions to var::groups
Create buildsystem::var::groups to configure packagers and
packagers_committers groups, and remove buildsystem::base which
is now empty.
-rw-r--r-- | deployment/mga_buildsystem/manifests/config.pp | 5 | ||||
-rw-r--r-- | modules/buildsystem/manifests/base.pp | 4 | ||||
-rw-r--r-- | modules/buildsystem/manifests/binrepo.pp | 5 | ||||
-rw-r--r-- | modules/buildsystem/manifests/buildnode.pp | 1 | ||||
-rw-r--r-- | modules/buildsystem/manifests/mainnode.pp | 1 | ||||
-rw-r--r-- | modules/buildsystem/manifests/maintdb.pp | 1 | ||||
-rw-r--r-- | modules/buildsystem/manifests/mgarepo.pp | 3 | ||||
-rw-r--r-- | modules/buildsystem/manifests/var/groups.pp | 9 | ||||
-rw-r--r-- | modules/buildsystem/templates/binrepo/sudoers.binrepo | 2 | ||||
-rw-r--r-- | modules/buildsystem/templates/binrepo/wrapper.upload-bin | 2 | ||||
-rw-r--r-- | modules/buildsystem/templates/maintdb/sudoers.maintdb | 2 | ||||
-rw-r--r-- | modules/buildsystem/templates/maintdb/wrapper.maintdb | 2 | ||||
-rwxr-xr-x | modules/buildsystem/templates/submit_package.pl | 2 |
13 files changed, 23 insertions, 16 deletions
diff --git a/deployment/mga_buildsystem/manifests/config.pp b/deployment/mga_buildsystem/manifests/config.pp index 6147d15a..c6afd765 100644 --- a/deployment/mga_buildsystem/manifests/config.pp +++ b/deployment/mga_buildsystem/manifests/config.pp @@ -3,6 +3,11 @@ class mga_buildsystem::config { keyid => '80420F66', } + class { 'buildsystem::var::groups': + packagers => 'mga-packagers', + packagers_committers => 'mga-packagers-committers', + } + include buildsystem::var::scheduler include buildsystem::var::repository class { 'buildsystem::var::youri': diff --git a/modules/buildsystem/manifests/base.pp b/modules/buildsystem/manifests/base.pp deleted file mode 100644 index 8befa33d..00000000 --- a/modules/buildsystem/manifests/base.pp +++ /dev/null @@ -1,4 +0,0 @@ -class buildsystem::base { - $packagers_group = 'mga-packagers' - $packagers_committers_group = 'mga-packagers-committers' -} diff --git a/modules/buildsystem/manifests/binrepo.pp b/modules/buildsystem/manifests/binrepo.pp index 9c81530d..861987ee 100644 --- a/modules/buildsystem/manifests/binrepo.pp +++ b/modules/buildsystem/manifests/binrepo.pp @@ -1,11 +1,8 @@ class buildsystem::binrepo { include buildsystem::var::binrepo - include buildsystem::base + include buildsystem::var::groups include sudo - # used in templates - $packagers_committers_group = $buildsystem::base::packagers_committers_group - user { $buildsystem::var::binrepo::login: comment => 'Binary files repository', home => $buildsystem::var::binrepo::homedir, diff --git a/modules/buildsystem/manifests/buildnode.pp b/modules/buildsystem/manifests/buildnode.pp index 7e3e657e..56230f68 100644 --- a/modules/buildsystem/manifests/buildnode.pp +++ b/modules/buildsystem/manifests/buildnode.pp @@ -1,5 +1,4 @@ class buildsystem::buildnode { - include buildsystem::base include buildsystem::iurt include buildsystem::var::scheduler include buildsystem::var::iurt diff --git a/modules/buildsystem/manifests/mainnode.pp b/modules/buildsystem/manifests/mainnode.pp index 820ccef5..08f4d1f2 100644 --- a/modules/buildsystem/manifests/mainnode.pp +++ b/modules/buildsystem/manifests/mainnode.pp @@ -1,6 +1,5 @@ class buildsystem::mainnode { include buildsystem::var::repository - include buildsystem::base include buildsystem::iurt::user include buildsystem::scheduler include buildsystem::gatherer diff --git a/modules/buildsystem/manifests/maintdb.pp b/modules/buildsystem/manifests/maintdb.pp index 02782271..7935e856 100644 --- a/modules/buildsystem/manifests/maintdb.pp +++ b/modules/buildsystem/manifests/maintdb.pp @@ -1,4 +1,5 @@ class buildsystem::maintdb { + include buildsystem::var::groups include sudo $login = 'maintdb' $homedir = '/var/lib/maintdb' diff --git a/modules/buildsystem/manifests/mgarepo.pp b/modules/buildsystem/manifests/mgarepo.pp index 7c37ddf2..eda9f1ee 100644 --- a/modules/buildsystem/manifests/mgarepo.pp +++ b/modules/buildsystem/manifests/mgarepo.pp @@ -1,5 +1,6 @@ class buildsystem::mgarepo { include buildsystem::var::scheduler + include buildsystem::var::groups $sched_login = $buildsystem::var::scheduler::login $sched_home_dir = $buildsystem::var::scheduler::homedir @@ -18,7 +19,7 @@ class buildsystem::mgarepo { file { ["$sched_home_dir/repsys/tmp", "$sched_home_dir/repsys/srpms"]: ensure => 'directory', owner => $sched_login, - group => $buildsystem::base::packagers_group, + group => $buildsystem::var::groups::packagers, mode => '1775', require => File["$sched_home_dir/repsys"], } diff --git a/modules/buildsystem/manifests/var/groups.pp b/modules/buildsystem/manifests/var/groups.pp new file mode 100644 index 00000000..7779a360 --- /dev/null +++ b/modules/buildsystem/manifests/var/groups.pp @@ -0,0 +1,9 @@ +# $packagers: +# name of packagers group, who should be allowed to submit packages +# $packagers_committers: +# name of group of users who are allowed to commit on packages +class buildsystem::var::groups( + $packagers, + $packagers_committers, +) { +} diff --git a/modules/buildsystem/templates/binrepo/sudoers.binrepo b/modules/buildsystem/templates/binrepo/sudoers.binrepo index 99cfe91f..c20810cf 100644 --- a/modules/buildsystem/templates/binrepo/sudoers.binrepo +++ b/modules/buildsystem/templates/binrepo/sudoers.binrepo @@ -1 +1 @@ -%<%= packagers_committers_group %> ALL =(<%= scope.lookupvar('buildsystem::var::binrepo::login') %>) NOPASSWD: <%= scope.lookupvar('buildsystem::var::binrepo::uploadbinpath') %> +%<%= scope.lookupvar('buildsystem::var::groups::packagers_committers') %> ALL =(<%= scope.lookupvar('buildsystem::var::binrepo::login') %>) NOPASSWD: <%= scope.lookupvar('buildsystem::var::binrepo::uploadbinpath') %> diff --git a/modules/buildsystem/templates/binrepo/wrapper.upload-bin b/modules/buildsystem/templates/binrepo/wrapper.upload-bin index bcc193fb..3def84a0 100644 --- a/modules/buildsystem/templates/binrepo/wrapper.upload-bin +++ b/modules/buildsystem/templates/binrepo/wrapper.upload-bin @@ -2,7 +2,7 @@ binrepouser="<%= scope.lookupvar('buildsystem::var::binrepo::login') %>" uploadbinpath="<%= scope.lookupvar('buildsystem::var::binrepo::uploadbinpath') %>" -packagerscommittersgroup="<%= packagers_committers_group %>" +packagerscommittersgroup="<%= scope.lookupvar('buildsystem::var::groups::packagers_committers') %>" function isingroup() { diff --git a/modules/buildsystem/templates/maintdb/sudoers.maintdb b/modules/buildsystem/templates/maintdb/sudoers.maintdb index 4613efcc..6e826830 100644 --- a/modules/buildsystem/templates/maintdb/sudoers.maintdb +++ b/modules/buildsystem/templates/maintdb/sudoers.maintdb @@ -1,2 +1,2 @@ -%<%= scope.lookupvar('buildsystem::base::packagers_group') %> ALL =(<%= login %>) NOPASSWD: <%= binpath %> +%<%= scope.lookupvar('buildsystem::var::groups::packagers') %> ALL =(<%= login %>) NOPASSWD: <%= binpath %> <%= scope.lookupvar('buildsystem::var::scheduler::login') %> ALL =(<%= login %>) NOPASSWD: <%= binpath %> diff --git a/modules/buildsystem/templates/maintdb/wrapper.maintdb b/modules/buildsystem/templates/maintdb/wrapper.maintdb index 8420022d..b3914806 100644 --- a/modules/buildsystem/templates/maintdb/wrapper.maintdb +++ b/modules/buildsystem/templates/maintdb/wrapper.maintdb @@ -2,7 +2,7 @@ maintdbuser="<%= login %>" maintdbpath="<%= binpath %>" -packagersgroup="<%= scope.lookupvar('buildsystem::base::packagers_group') %>" +packagersgroup="<%= scope.lookupvar('buildsystem::var::groups::packagers') %>" function isingroup() { diff --git a/modules/buildsystem/templates/submit_package.pl b/modules/buildsystem/templates/submit_package.pl index 2b0e966d..7ef81e65 100755 --- a/modules/buildsystem/templates/submit_package.pl +++ b/modules/buildsystem/templates/submit_package.pl @@ -3,7 +3,7 @@ use strict; use warnings; my $svn_server = 'svn.<%= domain %>'; -my $packagersgroup="<%= scope.lookupvar('buildsystem::base::packagers_group') %>"; +my $packagersgroup="<%= scope.lookupvar('buildsystem::var::groups::packagers') %>"; my $login = getpwuid($<); my (undef, undef, undef, $members) = getgrnam $packagersgroup; |