Puppet Class: profile::logoutd

Defined in:
modules/profile/manifests/logoutd.pp

Summary

this class provides scaffolding for logoutd A cli based API for deleting user sessions

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • owner (String) (defaults to: lookup('profile::logoutd::owner'))

    the owner of the scripts

  • group (String) (defaults to: lookup('profile::logoutd::group'))

    the group of the scripts

  • scripts (Hash) (defaults to: lookup('profile::logoutd::scripts'))

    A hash of profile::logoutd::scripts to install



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
# File 'modules/profile/manifests/logoutd.pp', line 7

class profile::logoutd (
    String $owner   = lookup('profile::logoutd::owner'),
    String $group   = lookup('profile::logoutd::group'),
    Hash   $scripts = lookup('profile::logoutd::scripts'),
) {
    $base_dir = '/etc/wikimedia/logout.d'
    wmflib::dir::mkdir_p($base_dir, {
        owner  => $owner,
        group  => $group,
        mode   => '0550',
        source => 'puppet:///modules/profile/logout.d',
    })
    file {'/usr/local/sbin/wmf-run-logout-scripts':
        ensure => file,
        owner  => 'root',
        group  => 'root',
        mode   => '0550',
        source => 'puppet:///modules/profile/logoutd/wmf_run_logout_scripts.py',
    }

    $scripts.each |$res_title, $params| {
        profile::logoutd::script { $res_title:
            * => $params,
        }
    }

    if debian::codename::eq('stretch') {
        file { '/usr/local/lib/python3.5/dist-packages/wmflib/':
            ensure => directory,
            mode   => '0755',
            owner  => 'root',
            group  => 'root',
        }

        file { '/usr/local/lib/python3.5/dist-packages/wmflib/exceptions.py':
            ensure => present,
            source => 'puppet:///modules/profile/logoutd/wmflib_exceptions.py',
            mode   => '0644',
            owner  => 'root',
            group  => 'root',
        }

        file { '/usr/local/lib/python3.5/dist-packages/wmflib/idm.py':
            ensure => present,
            source => 'puppet:///modules/profile/logoutd/wmflib_idm.py',
            mode   => '0644',
            owner  => 'root',
            group  => 'root',
        }
    }

    profile::logoutd::script {'systemdlogoutd':
        source => 'puppet:///modules/profile/logout.d/systemdlogind-logout.py',
    }
}