diff options
author | Antoine Beaupre <anarcat@koumbit.org> | 2009-06-24 13:53:56 -0400 |
---|---|---|
committer | Antoine Beaupre <anarcat@koumbit.org> | 2009-06-24 13:53:56 -0400 |
commit | 6cd081f233dacd9bc0a90761052180793e6fb8e8 (patch) | |
tree | 911354b268bcb889516d689d7cb9054aab9ac2b1 /manifests | |
parent | 0e8242550cb29229a1f46bd7d5005cbe592cfd8c (diff) | |
download | puppet-reprepro-6cd081f233dacd9bc0a90761052180793e6fb8e8.tar.gz puppet-reprepro-6cd081f233dacd9bc0a90761052180793e6fb8e8.tar.bz2 |
create a reprepro user, createsymlinks when distros change, fix source syntax
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 61 |
1 files changed, 39 insertions, 22 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index e3b0e60..1e4bd70 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,5 +1,7 @@ class reprepro { + $basedir = '/srv/reprepro' + package { "reprepro": ensure => '3.9.2-1~bpo40+1'; @@ -8,61 +10,76 @@ class reprepro { ensure => '0.2.0-1~bpo40+1'; } + user { "reprepro": + ensure => "present", + home => "$basedir", + gid => "reprepro", + password => "*", + comment => "reprepro sandbox", + require => Group["reprepro"], + } + group { "reprepro": ensure => "present", } file { - "/srv/reprepro": + "$basedir": ensure => directory, mode => 0771, owner => root, group => reprepro; - "/srv/reprepro/conf": + "$basedir/conf": ensure => directory, mode => 0770, owner => root, group => reprepro; - "/srv/reprepro/db": + "$basedir/db": ensure => directory, - mode => 0770, owner => root, group => reprepro; + mode => 0770, owner => reprepro, group => reprepro; - "/srv/reprepro/dists": + "$basedir/dists": ensure => directory, - mode => 0775, owner => root, group => reprepro; + mode => 0775, owner => reprepro, group => reprepro; - "/srv/reprepro/pool": + "$basedir/pool": ensure => directory, - mode => 0775, owner => root, group => reprepro; + mode => 0775, owner => reprepro, group => reprepro; - "/srv/reprepro/incoming": + "$basedir/incoming": ensure => directory, - mode => 0775, owner => root, group => reprepro; + mode => 0775, owner => reprepro, group => reprepro; - "/srv/reprepro/logs": + "$basedir/logs": ensure => directory, - mode => 0775, owner => root, group => reprepro; + mode => 0775, owner => reprepro, group => reprepro; - "/srv/reprepro/tmp": + "$basedir/tmp": ensure => directory, - mode => 0775, owner => root, group => reprepro; + mode => 0775, owner => reprepro, group => reprepro; - "/srv/reprepro/conf/distributions": + "$basedir/conf/distributions": mode => 0664, owner => root, group => reprepro, - source => "$fileserver/reprepro/distributions"; + source => "puppet://$servername/reprepro/distributions"; - "/srv/reprepro/conf/uploaders": + "$basedir/conf/uploaders": mode => 0660, owner => root, group => reprepro, - source => "$fileserver/reprepro/uploaders"; + source => "puppet://$servername/reprepro/uploaders"; - "/srv/reprepro/conf/incoming": + "$basedir/conf/incoming": mode => 0664, owner => root, group => reprepro, - source => "$fileserver/reprepro/incoming"; + source => "puppet://$servername/reprepro/incoming"; - "/srv/reprepro/index.html": + "$basedir/index.html": mode => 0664, owner => root, group => reprepro, - source => "$fileserver/reprepro/index.html"; + source => "puppet://$servername/reprepro/index.html"; } + exec { "reprepro -b $basedir createsymlinks": + refreshonly => true, + subscribe => File["$basedir/conf/distributions"], + path => "/usr/bin:/bin", + } + # TODO: additional things this class could do # setup inotincoming cronjob # ensure it stays running |