aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mirror/manifests/init.pp
blob: 5a752f81d76de5e23a8e7f54203853bf11f10392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
class mirror {
    class base {
	file { "/home/mirror/bin/":
	    ensure => directory,
            owner => mirror,
	    group => mirror,
	    mode => 755
	}

	group {"mirror":
	    ensure => present,
	}

	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"],
	}
    }
}