diff options
author | Olivier Thauvin <nanardon@mageia.org> | 2010-10-27 00:09:14 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mageia.org> | 2010-10-27 00:09:14 +0000 |
commit | 477f0edcaab9b614802063039b8688d64c2a6861 (patch) | |
tree | d108594639a46ba859ae37341c82b9baab4fbb95 /modules/mirror | |
parent | ca22f604e680d63a679236eb7ebead911378d32e (diff) | |
download | puppet-477f0edcaab9b614802063039b8688d64c2a6861.tar puppet-477f0edcaab9b614802063039b8688d64c2a6861.tar.gz puppet-477f0edcaab9b614802063039b8688d64c2a6861.tar.bz2 puppet-477f0edcaab9b614802063039b8688d64c2a6861.tar.xz puppet-477f0edcaab9b614802063039b8688d64c2a6861.zip |
- add task for mirror
Diffstat (limited to 'modules/mirror')
-rw-r--r-- | modules/mirror/manifests/init.pp | 22 | ||||
-rw-r--r-- | modules/mirror/templates/cron | 3 | ||||
-rw-r--r-- | modules/mirror/templates/update_timestamp | 5 |
3 files changed, 30 insertions, 0 deletions
diff --git a/modules/mirror/manifests/init.pp b/modules/mirror/manifests/init.pp new file mode 100644 index 00000000..6adce9e1 --- /dev/null +++ b/modules/mirror/manifests/init.pp @@ -0,0 +1,22 @@ +class mirror { + + file { "update_timestamp": + path => "/home/mirror/bin/update_timestamp", + ensure => present, + owner => mirror, + group => mirror, + mode => 755, + content => template("mirror/update_timestamp") + } + + file { "mirror.cron": + path => "/etc/cron.d/mirror", + ensure => present, + owner => root, + group => root, + mode => 644, + require => File["update_timestamp"], + content => template("mirror/cron") + } + +} diff --git a/modules/mirror/templates/cron b/modules/mirror/templates/cron new file mode 100644 index 00000000..771ab5de --- /dev/null +++ b/modules/mirror/templates/cron @@ -0,0 +1,3 @@ +# $Id$ +14 10 * * * mirror ~mirror/bin/update_timestamp + diff --git a/modules/mirror/templates/update_timestamp b/modules/mirror/templates/update_timestamp new file mode 100644 index 00000000..a037d10d --- /dev/null +++ b/modules/mirror/templates/update_timestamp @@ -0,0 +1,5 @@ +#!/bin/sh + +# $id$ + +date +%s%n%c > /distrib/mirror/mageia_timestamp |