aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/softwarekey/manifests/init.pp
blob: 4296cce0860b5a5c1c7779a2f4d2fcbb98a2f30c (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
class softwarekey {
    class variable {
	$sign_login = "softwarekey"
	$sign_home_dir = "/var/lib/$sign_login"
	$sign_keydir = "$sign_home_dir/keys"
    }

    class base inherits variable {
	group {"$sign_login":
	    ensure => present,
	}

	user {"$sign_login":
	    ensure => present,
	    comment => "System user to sign Mageia Software",
	    managehome => true,
	    home => $sign_home_dir,
	    gid => $sign_login,
	    shell => "/bin/bash",
	    require => Group[$sign_login],
	}

	gnupg::keys{"software":
	    email => "software@$domain",
	    #FIXME there should be a variable somewhere to change the name of the distribution
	    key_name => 'Mageia Software',
	    login => $sign_login,
	    batchdir => "$sign_home_dir/batches",
	    keydir => $sign_keydir,
	    require => User[$sign_login],
	}
    }
}