From 477f0edcaab9b614802063039b8688d64c2a6861 Mon Sep 17 00:00:00 2001 From: Olivier Thauvin Date: Wed, 27 Oct 2010 00:09:14 +0000 Subject: - add task for mirror --- modules/mirror/manifests/init.pp | 22 ++++++++++++++++++++++ modules/mirror/templates/cron | 3 +++ modules/mirror/templates/update_timestamp | 5 +++++ 3 files changed, 30 insertions(+) create mode 100644 modules/mirror/manifests/init.pp create mode 100644 modules/mirror/templates/cron create mode 100644 modules/mirror/templates/update_timestamp (limited to 'modules/mirror') 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 -- cgit v1.2.1