aboutsummaryrefslogtreecommitdiffstats
path: root/modules/testvm/manifests/init.pp
blob: a13608f1b283bc64098f38c2bc494692ca1c7e0e (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
class testvm
{
    $testvm_login = "testvm"
    $testvmdir = "/home/testvm"

    group {"$testvm_login":
	ensure => present,
    }

    user {"$testvm_login":
	ensure => present,
	comment => "System user used to run test VMs",
	managehome => true,
	gid => $vmtest_login,
	shell => "/bin/bash",
    }
    
    file { "$testvmdir/bin/":
        ensure => directory,
        require => User[$testvm_login],
    }

    file { "$testvmdir/bin/_vm":
	ensure => present,
        owner => root,
	group => root,
	mode => 644,
	source => "puppet:///modules/testvm/_vm",
        require => File["$testvmdir/bin"],
    }

    file { "$testvmdir/bin/vm-jonund":
	ensure => present,
        owner => root,
	group => $testvm_login,
	mode => 750,
	source => "puppet:///modules/testvm/vm-jonund",
        require => File["$testvmdir/bin"],
    }
}