diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-01-18 15:10:30 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-01-18 15:10:30 +0000 |
commit | 43c5580e6f735aef097244c4f6c6061bad5bf47b (patch) | |
tree | cac2d502eed80e4d4c76e216e564115339a95b30 /modules/mirror | |
parent | 15721e3cd53e211911eaac923624c2440b61c234 (diff) | |
download | puppet-43c5580e6f735aef097244c4f6c6061bad5bf47b.tar puppet-43c5580e6f735aef097244c4f6c6061bad5bf47b.tar.gz puppet-43c5580e6f735aef097244c4f6c6061bad5bf47b.tar.bz2 puppet-43c5580e6f735aef097244c4f6c6061bad5bf47b.tar.xz puppet-43c5580e6f735aef097244c4f6c6061bad5bf47b.zip |
split mirror class in mirror::base and mirror::main
Diffstat (limited to 'modules/mirror')
-rw-r--r-- | modules/mirror/manifests/init.pp | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/modules/mirror/manifests/init.pp b/modules/mirror/manifests/init.pp index 512b0463..5a752f81 100644 --- a/modules/mirror/manifests/init.pp +++ b/modules/mirror/manifests/init.pp @@ -1,40 +1,42 @@ class mirror { + class base { + file { "/home/mirror/bin/": + ensure => directory, + owner => mirror, + group => mirror, + mode => 755 + } - file { "update_timestamp": - path => "/home/mirror/bin/update_timestamp", - ensure => present, - owner => mirror, - group => mirror, - mode => 755, - content => template("mirror/update_timestamp") - } - - file { "/home/mirror/bin/": - ensure => directory, - owner => mirror, - group => mirror, - mode => 755 - } + group {"mirror": + ensure => present, + } - group {"mirror": - ensure => present, - } - - user {"mirror": - ensure => present, - comment => "System user use to run mirror scripts", - managehome => true, - gid => mirror, - shell => "/bin/bash", + user {"mirror": + ensure => present, + comment => "System user use to run mirror scripts", + managehome => true, + gid => mirror, + shell => "/bin/bash", + } } + # For main Mageia mirror + class main inherits base { + file { "update_timestamp": + path => "/home/mirror/bin/update_timestamp", + ensure => present, + owner => mirror, + group => mirror, + mode => 755, + content => template("mirror/update_timestamp") + } - cron { mirror: - user => mirror, - hour => 10, - minute => 14, - command => "~mirror/bin/update_timestamp", - require => File["update_timestamp"], + cron { mirror: + user => mirror, + hour => 10, + minute => 14, + command => "~mirror/bin/update_timestamp", + require => File["update_timestamp"], + } } - } |