diff options
author | Michael Scherer <misc@mageia.org> | 2012-03-19 16:46:02 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2012-03-19 16:46:02 +0000 |
commit | 69d9d57e95b6acaf4d460adacac23300098df6f3 (patch) | |
tree | 34a43fc39f814320cfd6951545ecf5280b6e9109 | |
parent | 93da31439ab2fee7de4412c86622d5f0c84cf376 (diff) | |
download | puppet-69d9d57e95b6acaf4d460adacac23300098df6f3.tar puppet-69d9d57e95b6acaf4d460adacac23300098df6f3.tar.gz puppet-69d9d57e95b6acaf4d460adacac23300098df6f3.tar.bz2 puppet-69d9d57e95b6acaf4d460adacac23300098df6f3.tar.xz puppet-69d9d57e95b6acaf4d460adacac23300098df6f3.zip |
split mirrordir into a separate file
-rw-r--r-- | modules/mirror/manifests/init.pp | 23 | ||||
-rw-r--r-- | modules/mirror/manifests/mirrordir.pp | 23 |
2 files changed, 23 insertions, 23 deletions
diff --git a/modules/mirror/manifests/init.pp b/modules/mirror/manifests/init.pp index 99289e05..78f13b42 100644 --- a/modules/mirror/manifests/init.pp +++ b/modules/mirror/manifests/init.pp @@ -16,27 +16,4 @@ class mirror { gid => mirror, } } - - define mirrordir ($remoteurl, $localdir, $rsync_options="-avH --delete") { - include base - $lockfile = "$locksdir/$name" - - file { "$localdir": - ensure => directory, - owner => mirror, - group => mirror, - } - - local_script { "mirror_$name": - content => template("mirror/mirrordir"), - } - - cron { "mirror_$name": - user => mirror, - minute => '*/10', - command => "$bindir/mirror_$name", - require => Local_script["mirror_$name"], - } - } - } diff --git a/modules/mirror/manifests/mirrordir.pp b/modules/mirror/manifests/mirrordir.pp new file mode 100644 index 00000000..2834b279 --- /dev/null +++ b/modules/mirror/manifests/mirrordir.pp @@ -0,0 +1,23 @@ +define mirror::mirrordir ($remoteurl, + $localdir, + $rsync_options='-avH --delete') { + include mirror::base + $lockfile = "$mirror::base::locksdir/$name" + + file { $localdir: + ensure => directory, + owner => 'mirror', + group => 'mirror', + } + + local_script { "mirror_$name": + content => template('mirror/mirrordir'), + } + + cron { "mirror_$name": + user => mirror, + minute => '*/10', + command => "/usr/local/bin/mirror_$name", + require => Local_script["mirror_$name"], + } +} |