Puppet Class: kibana::phatality

Defined in:
modules/kibana/manifests/phatality.pp

Overview

SPDX-License-Identifier: Apache-2.0



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
# File 'modules/kibana/manifests/phatality.pp', line 2

class kibana::phatality () {
    $target = 'releng/phatality'

    scap::target { $target:
        deploy_user => 'deploy-service',
        manage_user => true,
        require     => [
            Package['kibana'],
        ],
    }

    $plugincmd = '/usr/share/kibana/bin/kibana-plugin'
    $deploydir = '/srv/deployment/releng/phatality/deploy'

    sudo::user { 'kibana-deploy-phatality':
        user       => 'deploy-service',
        privileges => [
            "ALL = (kibana) NOPASSWD: ${plugincmd} install file\\://${deploydir}/*",
            "ALL = (kibana) NOPASSWD: ${plugincmd} remove *",
            'ALL = (root) NOPASSWD: /usr/bin/systemctl restart kibana',
        ]
    }

    file { '/usr/share/kibana/bin/upgrade-phatality.sh':
        ensure => 'file',
        mode   => '0555',
        source => 'puppet:///modules/kibana/upgrade-phatality.sh',
    }
}