1 |
class mirror { |
2 |
class base { |
3 |
file { "/home/mirror/bin/": |
4 |
ensure => directory, |
5 |
owner => mirror, |
6 |
group => mirror, |
7 |
mode => 755 |
8 |
} |
9 |
|
10 |
group {"mirror": |
11 |
ensure => present, |
12 |
} |
13 |
|
14 |
user {"mirror": |
15 |
ensure => present, |
16 |
comment => "System user use to run mirror scripts", |
17 |
managehome => true, |
18 |
gid => mirror, |
19 |
shell => "/bin/bash", |
20 |
} |
21 |
} |
22 |
|
23 |
# For main Mageia mirror |
24 |
class main inherits base { |
25 |
file { "update_timestamp": |
26 |
path => "/home/mirror/bin/update_timestamp", |
27 |
ensure => present, |
28 |
owner => mirror, |
29 |
group => mirror, |
30 |
mode => 755, |
31 |
content => template("mirror/update_timestamp") |
32 |
} |
33 |
|
34 |
cron { mirror: |
35 |
user => mirror, |
36 |
hour => 10, |
37 |
minute => 14, |
38 |
command => "~mirror/bin/update_timestamp", |
39 |
require => File["update_timestamp"], |
40 |
} |
41 |
} |
42 |
} |