aboutsummaryrefslogtreecommitdiffstats
path: root/modules/bcd/manifests/init.pp
blob: db55c19d84223dba0d2d0d8950a6f089662603cb (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
class bcd {
    class variable {
        $bcd_login = 'bcd'
        $bcd_home = '/home/bcd'
	$public_isos = "$bcd_home/public_html/isos"
	$isomakers_group = 'mga-iso_makers'
    }

    class base inherits variable {
	include sudo

        buildsystem::sshuser { $bcd_login:
            homedir => $bcd_home,
            comment => "User for creating ISOs",
	}

	file { $public_isos:
	    ensure => directory,
	    owner => $bcd_login,
	    group => $bcd_login,
	    mode => 755,
	}

        #package { bcd:
	#    ensure => 'installed',
        #}

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

	file { "/var/lib/bcd":
	    ensure => directory,
	    owner => $bcd_login,
	    group => $bcd_login,
	    mode => 755,
	}

    }

    class web inherits base {
        apache::vhost_base { "bcd.$domain":
	    location => "$bcd_home/public_html",
	    content => template('bcd/vhost_bcd.conf'),
	}
	file {"htaccess":
	    path => "$bcd_home/public_html/.htaccess",
	    ensure => present,
	    owner => bcd,
	    group => bcd,
	    mode => 755,
	    content => template("bcd/.htaccess")
	}
	file {"htpasswd":
            path => "$bcd_home/public_html/.htpasswd",
            ensure => present,
            owner => bcd,
            group => bcd,
            mode => 755,
            content => template("bcd/.htpasswd")
        }
    }

    class rsync inherits base {
        class { rsyncd:
		rsyncd_conf => 'bcd/rsyncd.conf'
	}
    }
}