diff options
Diffstat (limited to 'modules/buildsystem/manifests')
-rw-r--r-- | modules/buildsystem/manifests/binrepo.pp | 21 | ||||
-rw-r--r-- | modules/buildsystem/manifests/var/binrepo.pp | 14 |
2 files changed, 21 insertions, 14 deletions
diff --git a/modules/buildsystem/manifests/binrepo.pp b/modules/buildsystem/manifests/binrepo.pp index 037352a0..9c81530d 100644 --- a/modules/buildsystem/manifests/binrepo.pp +++ b/modules/buildsystem/manifests/binrepo.pp @@ -1,26 +1,19 @@ class buildsystem::binrepo { + include buildsystem::var::binrepo include buildsystem::base include sudo - $login = 'binrepo' - $homedir = "/var/lib/$login" - $repodir = "$homedir/data" - - $uploadinfosdir = "$homedir/infos" - $uploadbinpath = '/usr/local/bin/upload-bin' - $uploadmail_from = "root@$::domain" - $uploadmail_to = "packages-commits@ml.$::domain" # used in templates $packagers_committers_group = $buildsystem::base::packagers_committers_group - user { $login: + user { $buildsystem::var::binrepo::login: comment => 'Binary files repository', - home => $homedir, + home => $buildsystem::var::binrepo::homedir, } - file { [$repodir, $uploadinfosdir]: + file { [$buildsystem::var::binrepo::repodir, $buildsystem::var::binrepo::uploadinfosdir]: ensure => directory, - owner => $login, + owner => $buildsystem::var::binrepo::login, } mga-common::local_script { @@ -34,8 +27,8 @@ class buildsystem::binrepo { content => template('buildsystem/binrepo/sudoers.binrepo') } - apache::vhost::base { "binrepo.$::domain": - location => $repodir, + apache::vhost::base { "binrepo.${::domain}": + location => $buildsystem::var::binrepo::repodir, content => template('buildsystem/binrepo/vhost_binrepo.conf'), } } diff --git a/modules/buildsystem/manifests/var/binrepo.pp b/modules/buildsystem/manifests/var/binrepo.pp new file mode 100644 index 00000000..d734c216 --- /dev/null +++ b/modules/buildsystem/manifests/var/binrepo.pp @@ -0,0 +1,14 @@ +# $uploadmail_from: +# from who will be sent the binrepo upload email notifications +# $uploadmail_to: +# where binrepo email notifications are sent +class buildsystem::var::binrepo( + $login = 'binrepo', + $homedir = '/var/lib/binrepo', + $uploadmail_from, + $uploadmail_to +) { + $repodir = "$homedir/data" + $uploadinfosdir = "$homedir/infos" + $uploadbinpath = '/usr/local/bin/upload-bin' +} |