diff options
author | Michael Scherer <misc@mageia.org> | 2012-03-16 22:46:37 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2012-03-16 22:46:37 +0000 |
commit | 8653753a27a8b67ff91be5d82f497f3d6c7f2746 (patch) | |
tree | 450a0775f9edab1220a3a37e45000535117ab2a5 | |
parent | b1dfebfc86261d66e43a71a71d7f63cfa3dec9dc (diff) | |
download | puppet-8653753a27a8b67ff91be5d82f497f3d6c7f2746.tar puppet-8653753a27a8b67ff91be5d82f497f3d6c7f2746.tar.gz puppet-8653753a27a8b67ff91be5d82f497f3d6c7f2746.tar.bz2 puppet-8653753a27a8b67ff91be5d82f497f3d6c7f2746.tar.xz puppet-8653753a27a8b67ff91be5d82f497f3d6c7f2746.zip |
clean binrepo module for puppet-lint compliance
5 files changed, 28 insertions, 24 deletions
diff --git a/modules/buildsystem/manifests/binrepo.pp b/modules/buildsystem/manifests/binrepo.pp index 3f5c4705..ca3a7e55 100644 --- a/modules/buildsystem/manifests/binrepo.pp +++ b/modules/buildsystem/manifests/binrepo.pp @@ -1,38 +1,42 @@ -class buildsystem { - class binrepo inherits base { +class buildsystem::binrepo { + include buildsystem::base include sudo - $binrepo_login = "binrepo" - $binrepo_homedir = "/var/lib/$binrepo_login" - $binrepodir = "$binrepo_homedir/data" - $uploadinfosdir = "$binrepo_homedir/infos" + $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" + $uploadmail_from = "root@$::domain" + $uploadmail_to = "packages-commits@ml.$::domain" + # used in templates $packagers_committers_group = $buildsystem::base::packagers_committers_group - user {"$binrepo_login": - comment => "Binary files repository", - home => "$binrepo_homedir", + user { $login: + comment => 'Binary files repository', + home => $homedir, } - file { [$binrepodir, $uploadinfosdir]: + file { [$repodir, $uploadinfosdir]: ensure => directory, - owner => $binrepo_login, + owner => $login, } local_script { - "upload-bin": content => template('buildsystem/binrepo/upload-bin'); - "wrapper.upload-bin": content => template('buildsystem/binrepo/wrapper.upload-bin'); + 'upload-bin': + content => template('buildsystem/binrepo/upload-bin'); + 'wrapper.upload-bin': + content => template('buildsystem/binrepo/wrapper.upload-bin'); } - sudo::sudoers_config { "binrepo": - content => template("buildsystem/binrepo/sudoers.binrepo") + sudo::sudoers_config { 'binrepo': + content => template('buildsystem/binrepo/sudoers.binrepo') } - apache::vhost_base { "binrepo.$domain": - location => $binrepodir, - content => template("buildsystem/binrepo/vhost_binrepo.conf"), + apache::vhost_base { "binrepo.$::domain": + location => $repodir, + content => template('buildsystem/binrepo/vhost_binrepo.conf'), } } } diff --git a/modules/buildsystem/templates/binrepo/sudoers.binrepo b/modules/buildsystem/templates/binrepo/sudoers.binrepo index 7a9efef4..405f43a3 100644 --- a/modules/buildsystem/templates/binrepo/sudoers.binrepo +++ b/modules/buildsystem/templates/binrepo/sudoers.binrepo @@ -1 +1 @@ -%<%= packagers_committers_group %> ALL =(<%= binrepo_login %>) NOPASSWD: <%= uploadbinpath %> +%<%= packagers_committers_group %> ALL =(<%= login %>) NOPASSWD: <%= uploadbinpath %> diff --git a/modules/buildsystem/templates/binrepo/upload-bin b/modules/buildsystem/templates/binrepo/upload-bin index ef64a1a3..c67f045a 100755 --- a/modules/buildsystem/templates/binrepo/upload-bin +++ b/modules/buildsystem/templates/binrepo/upload-bin @@ -1,5 +1,5 @@ #!/bin/sh -binrepodir=<%= binrepodir %> +binrepodir=<%= repodir %> uploadinfosdir=<%= uploadinfosdir %> tmpfile=$(mktemp) mail_from="<%= uploadmail_from %>" diff --git a/modules/buildsystem/templates/binrepo/vhost_binrepo.conf b/modules/buildsystem/templates/binrepo/vhost_binrepo.conf index 8206614f..ce29accf 100644 --- a/modules/buildsystem/templates/binrepo/vhost_binrepo.conf +++ b/modules/buildsystem/templates/binrepo/vhost_binrepo.conf @@ -1,3 +1,3 @@ -<Directory <%= binrepodir %>> +<Directory <%= repodir %>> Options None </Directory> diff --git a/modules/buildsystem/templates/binrepo/wrapper.upload-bin b/modules/buildsystem/templates/binrepo/wrapper.upload-bin index 4e79e494..48385a47 100644 --- a/modules/buildsystem/templates/binrepo/wrapper.upload-bin +++ b/modules/buildsystem/templates/binrepo/wrapper.upload-bin @@ -1,6 +1,6 @@ #!/bin/sh -binrepouser="<%= binrepo_login %>" +binrepouser="<%= login %>" uploadbinpath="<%= uploadbinpath %>" packagerscommittersgroup="<%= packagers_committers_group %>" |