Puppet Class: cfpuppetserver

Defined in:
manifests/init.pp

Overview

Please see README

Parameters:

  • deployuser (String[1]) (defaults to: 'deploypuppet')
  • deployuser_auth_keys (Optional[Hash]) (defaults to: undef)
  • repo_url (Optional[String[1]]) (defaults to: undef)
  • puppetserver (Boolean) (defaults to: true)
  • puppetdb (Boolean) (defaults to: true)
  • postgresql (Boolean) (defaults to: true)
  • autodiscovery (Boolean) (defaults to: true)
  • puppetdb_hosts (Variant[String[1], Array[String[1]]]) (defaults to: [])
  • puppetserver_hosts (Variant[String[1], Array[String[1]]]) (defaults to: [])
  • client_hosts (Variant[String[1], Array[String[1]]]) (defaults to: [])
  • iface (String[1]) (defaults to: 'any')
  • cluster (String[1]) (defaults to: 'cfpuppet')
  • database (String[1]) (defaults to: 'puppetdb')
  • is_cluster (Boolean) (defaults to: false)
  • is_secondary (Boolean) (defaults to: false)
  • is_arbitrator (Boolean) (defaults to: false)
  • allow_update_check (Boolean) (defaults to: false)


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
70
# File 'manifests/init.pp', line 7

class cfpuppetserver (
    String[1]
        $deployuser = 'deploypuppet',
    Optional[Hash]
        $deployuser_auth_keys = undef,
    Optional[String[1]]
        $repo_url = undef,

    Boolean
        $puppetserver = true,
    Boolean
        $puppetdb = true,
    Boolean
        $postgresql = true,

    Boolean
        $autodiscovery = true,
    Variant[String[1], Array[String[1]]]
        $puppetdb_hosts = [],
    Variant[String[1], Array[String[1]]]
        $puppetserver_hosts = [],
    Variant[String[1], Array[String[1]]]
        $client_hosts = [], # hosts to whitelist for SSH access

    String[1]
        $iface = 'any',
    String[1]
        $cluster = 'cfpuppet',
    String[1]
        $database = 'puppetdb',
    Boolean
        $is_cluster = false,
    Boolean
        $is_secondary = false,
    Boolean
        $is_arbitrator = false,
    Boolean
        $allow_update_check = false,
) {
    include stdlib
    include cfnetwork
    include cfsystem
    include cfsystem::custombin

    #---
    $jre = 'openjdk-8-jre-headless'
    include cfpuppetserver::postgresql
    include cfpuppetserver::puppetdb
    include cfpuppetserver::puppetserver

    class { 'cfpuppetserver::internal::services':
        stage => 'deploy',
    }

    #---
    file {"${cfsystem::custombin::bin_dir}/cf_gen_puppet_client_init":
        owner   => root,
        group   => root,
        mode    => '0750',
        content => epp('cfpuppetserver/genclientinit.sh.epp', {
            puppet_host => $cfsystem::puppet_host
        }),
    }
}