aboutsummaryrefslogtreecommitdiffstats
path: root/modules/draklive/manifests/init.pp
blob: 3ba24d877741e90345f46684e3d350441a363f4d (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
43
44
45
46
47
48
49
class draklive {
    class variable {
        $draklive_login = 'draklive'
        $draklive_home = '/home/draklive'
        $draklive_config = "$draklive_home/live-config"
        $draklive_var_data = "$draklive_home/var-data"
	$isomakers_group = 'mga-iso_makers'
    }

    class base inherits variable {
	include sudo

        buildsystem::sshuser { $draklive_login:
            homedir => $draklive_home,
            comment => "User for creating live ISOs",
	}

        package { draklive:
	    ensure => 'installed',
        }

        sudo::sudoers_config { "draklive":
	    content => template("draklive/sudoers.draklive")
        }

	file { $draklive_var_data:
	    ensure => directory,
	    owner => $draklive_login,
	    group => $draklive_login,
	    mode => 755,
	}

	file { "/var/lib/draklive":
	     ensure => symlink,
	     target => $draklive_var_data,
	}

        subversion::snapshot { $draklive_config:
            source => "svn://svn.$domain/soft/images-config/draklive/trunk/",
        }

        cron { "build live images":
            command => "$draklive_config/tools/build_live.sh",
            user => $draklive_login,
            hour => "4",
            minute => "30",
        }
    }
}