Puppet Class: puppet_compiler::setup

Defined in:
modules/puppet_compiler/manifests/setup.pp

Overview

Parameters:

  • vardir (Any)
  • user (Any)
  • homedir (Any)


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'modules/puppet_compiler/manifests/setup.pp', line 5

class puppet_compiler::setup($vardir, $user, $homedir) {
    # Install the puppet var dir files
    exec { 'create puppet directories':
        command     => "/usr/bin/puppet master --compile test --vardir ${vardir}",
        creates     => "${vardir}/yaml",
        user        => $user,
        cwd         => $homedir,
        environment => "HOME=${homedir}",
        require     => File[$vardir],
    }

    # Create the ssl directory, and the puppet ca
    exec { 'Generate CA for the compiler':
        command     => "/usr/bin/puppet cert --ssldir ${vardir}/ssl --vardir ${vardir} generate ${::fqdn}",
        creates     => "${vardir}/ssl/certs/${::fqdn}.pem",
        user        => $user,
        cwd         => $homedir,
        environment => "HOME=${homedir}",
        require     => Exec['create puppet directories'],
    }
}