Puppet Class: openstack::nova::fullstack::service

Defined in:
modules/openstack/manifests/nova/fullstack/service.pp

Overview

Parameters:

  • active (Any)
  • password (Any)
  • region (Any)
  • puppetmaster (Any)
  • interval (Any) (defaults to: 300)
  • max_pool (Any) (defaults to: 11)
  • creation_timeout (Any) (defaults to: 900)
  • ssh_timeout (Any) (defaults to: 900)
  • puppet_timeout (Any) (defaults to: 900)
  • keyfile (Any) (defaults to: '/var/lib/osstackcanary/osstackcanary_id')
  • certkeyfile (Any) (defaults to: '/var/lib/osstackcanary/puppetcertmanager_id')
  • certmanager (Any) (defaults to: 'certmanager')
  • network (Any) (defaults to: '')


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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'modules/openstack/manifests/nova/fullstack/service.pp', line 7

class openstack::nova::fullstack::service(
    $active,
    $password,
    $region,
    $puppetmaster,
    $interval = 300,
    $max_pool = 11,
    $creation_timeout = 900,
    $ssh_timeout = 900,
    $puppet_timeout = 900,
    $keyfile = '/var/lib/osstackcanary/osstackcanary_id',
    $certkeyfile = '/var/lib/osstackcanary/puppetcertmanager_id',
    $certmanager = 'certmanager',
    $network = '',
    ) {

    group { 'osstackcanary':
        ensure => 'present',
        name   => 'osstackcanary',
    }

    user { 'osstackcanary':
        ensure     => 'present',
        gid        => 'osstackcanary',
        shell      => '/bin/false',
        home       => '/var/lib/osstackcanary',
        managehome => true,
        system     => true,
        require    => Group['osstackcanary'],
    }

    file { '/usr/local/sbin/nova-fullstack':
        ensure => 'present',
        mode   => '0755',
        owner  => 'osstackcanary',
        group  => 'osstackcanary',
        source => 'puppet:///modules/openstack/nova/fullstack/nova_fullstack_test.py',
    }

    file { $keyfile:
        ensure    => 'present',
        mode      => '0600',
        owner     => 'osstackcanary',
        group     => 'osstackcanary',
        content   => secret('nova/osstackcanary'),
        show_diff => false,
    }

    file { $certkeyfile:
        ensure    => 'present',
        mode      => '0600',
        owner     => 'osstackcanary',
        group     => 'osstackcanary',
        content   => secret('ssh/puppet_cert_manager/cert_manager'),
        show_diff => false,
    }

    $ensure = $active ? {
        true    => 'present',
        default => 'absent',
    }

    file { '/usr/local/bin/nova-fullstack':
        ensure  => 'present',
        mode    => '0544',
        owner   => 'root',
        group   => 'root',
        content => template('openstack/initscripts/nova-fullstack.erb'),
    }

    systemd::service { 'nova-fullstack':
        ensure  => $ensure,
        content => systemd_template('nova-fullstack'),
        restart => true,
        require => [
                    File['/usr/local/bin/nova-fullstack'],
                    ],
    }
}