diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/cron.pp | 4 | ||||
-rw-r--r-- | manifests/disabled.pp | 4 | ||||
-rw-r--r-- | manifests/init.pp | 69 | ||||
-rw-r--r-- | manifests/lighty.pp | 6 |
4 files changed, 40 insertions, 43 deletions
diff --git a/manifests/cron.pp b/manifests/cron.pp index 4cc7dd8..d07bb36 100644 --- a/manifests/cron.pp +++ b/manifests/cron.pp @@ -1,8 +1,8 @@ class reprepro::cron { cron { reprepro: command => "/usr/bin/reprepro --silent -b ${reprepro::basedir} processincoming incoming", - user => reprepro, - minute => '*/5', + user => reprepro, + minute => '*/5', require => [ Package['reprepro'], File["${reprepro::basedir}/conf/distributions"] ] } } diff --git a/manifests/disabled.pp b/manifests/disabled.pp index 9c822fc..69e7725 100644 --- a/manifests/disabled.pp +++ b/manifests/disabled.pp @@ -1,8 +1,8 @@ class reprepro::disabled( - $basedir = '/srv/reprepro' + $basedir = '/srv/reprepro' ) { cron { reprepro: - command => "/usr/bin/reprepro --silent -b ${reprepro::basedir} processincoming incoming", + command => "/usr/bin/reprepro --silent -b ${basedir} processincoming incoming", user => reprepro, ensure => absent, } diff --git a/manifests/init.pp b/manifests/init.pp index 96ad467..ec53e86 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,14 +4,11 @@ class reprepro( $basedir = '/srv/reprepro' ) { - $reprepro_origin = $origin - $reprepro_uploaders = $uploaders - - case $reprepro_uploaders { + case $uploaders { '': { fail("You need the repository uploaders! Please pass \$uploaders parameter") } } - case $lsbdistcodename { + case $::lsbdistcodename { etch: { package { "reprepro": ensure => '3.9.2-1~bpo40+1'; @@ -25,12 +22,12 @@ class reprepro( } user { "reprepro": - ensure => "present", - home => "$basedir", - gid => "reprepro", + ensure => "present", + home => "${basedir}", + gid => "reprepro", password => "*", - comment => "reprepro sandbox", - require => Group["reprepro"], + comment => "reprepro sandbox", + require => Group["reprepro"], } group { "reprepro": @@ -38,59 +35,59 @@ class reprepro( } file { - "$basedir": + "${basedir}": ensure => directory, mode => 0771, owner => reprepro, group => reprepro; - "$basedir/conf": + "${basedir}/conf": ensure => directory, mode => 0770, owner => root, group => reprepro; - "$basedir/db": + "${basedir}/db": ensure => directory, mode => 0770, owner => reprepro, group => reprepro; - "$basedir/dists": + "${basedir}/dists": ensure => directory, mode => 0775, owner => reprepro, group => reprepro; - "$basedir/pool": + "${basedir}/pool": ensure => directory, mode => 0775, owner => reprepro, group => reprepro; - "$basedir/incoming": + "${basedir}/incoming": ensure => directory, mode => 1777, owner => reprepro, group => reprepro; - "$basedir/logs": + "${basedir}/logs": ensure => directory, mode => 0775, owner => reprepro, group => reprepro; - "$basedir/tmp": + "${basedir}/tmp": ensure => directory, mode => 0775, owner => reprepro, group => reprepro; - "$basedir/conf/distributions": + "${basedir}/conf/distributions": mode => 0664, owner => root, group => reprepro, content => template("reprepro/distributions.erb"); - "$basedir/conf/uploaders": + "${basedir}/conf/uploaders": mode => 0660, owner => root, group => reprepro, content => template("reprepro/uploaders.erb"); - "$basedir/conf/incoming": + "${basedir}/conf/incoming": mode => 0664, owner => root, group => reprepro, source => "puppet://$server/modules/reprepro/incoming"; - "$basedir/index.html": + "${basedir}/index.html": mode => 0664, owner => root, group => reprepro, content => template("reprepro/index.html.erb"); - "$basedir/.gnupg": + "${basedir}/.gnupg": mode => 700, owner => reprepro, group => reprepro, ensure => directory; - "$basedir/.gnupg/secring.gpg": + "${basedir}/.gnupg/secring.gpg": mode => 600, owner => reprepro, group => reprepro, ensure => present; @@ -103,26 +100,26 @@ class reprepro( } exec { - "reprepro -b $basedir createsymlinks": - command => "/usr/bin/reprepro -b $basedir --delete createsymlinks", + "reprepro -b ${basedir} createsymlinks": + command => "/usr/bin/reprepro -b ${basedir} --delete createsymlinks", refreshonly => true, - subscribe => File["$basedir/conf/distributions"], - user => reprepro, - path => "/usr/bin:/bin"; - "reprepro -b $basedir export": - command => "/usbr/bin/reprepro -b $basedir export", + subscribe => File["${basedir}/conf/distributions"], + user => reprepro, + path => "/usr/bin:/bin"; + "reprepro -b ${basedir} export": + command => "/usbr/bin/reprepro -b ${basedir} export", refreshonly => true, - user => reprepro, - subscribe => File["$basedir/conf/distributions"], - path => "/usr/bin:/bin"; + user => reprepro, + subscribe => File["${basedir}/conf/distributions"], + path => "/usr/bin:/bin"; "/usr/local/bin/reprepro-export-key": - creates => "$basedir/key.asc", + creates => "${basedir}/key.asc", user => reprepro, require => File["/usr/local/bin/reprepro-export-key"]; "/usr/local/bin/reprepro-export-key-update": command => "/usr/local/bin/reprepro-export-key", user => reprepro, - subscribe => File["$basedir/.gnupg/secring.gpg"], + subscribe => File["${basedir}/.gnupg/secring.gpg"], require => File["/usr/local/bin/reprepro-export-key"], refreshonly => true, } diff --git a/manifests/lighty.pp b/manifests/lighty.pp index 24228cf..8b7f90f 100644 --- a/manifests/lighty.pp +++ b/manifests/lighty.pp @@ -1,10 +1,10 @@ class reprepro::lighty inherits lighttpd { file { "/etc/lighttpd/conf-available/20-reprepro.conf": - ensure => present, + ensure => present, content => "alias.url += ( \"/debian/\" => \"$reprepro::basedir/\" )\n"; "/etc/lighttpd/conf-enabled/20-reprepro.conf": - ensure => "/etc/lighttpd/conf-available/20-reprepro.conf", + ensure => "/etc/lighttpd/conf-available/20-reprepro.conf", require => File['/etc/lighttpd/conf-available/20-reprepro.conf'], - notify => Service['lighttpd']; + notify => Service['lighttpd']; } } |