Defined Type: profile::logoutd::script

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

Overview

Parameters:

  • source (Optional[Stdlib::Filesource]) (defaults to: undef)

    a puppet Source to the script file

  • content (Optional[String]) (defaults to: undef)

    String content of the script

  • priority (Integer[1,99]) (defaults to: 50)


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'modules/profile/manifests/logoutd/script.pp', line 6

define profile::logoutd::script (
    Integer[1,99]                $priority = 50,
    Optional[Stdlib::Filesource] $source   = undef,
    Optional[String]             $content  = undef,
) {
    include profile::logoutd
    unless $source or $content {
        fail('must provide either $source or $content')
    }
    if $source and $content {
        fail('must provide only one of $source or $content')
    }
    $file_name = sprintf('%s/%02d-%s', $profile::logoutd::base_dir, $priority, $title)
    file { $file_name:
        ensure  => file,
        owner   => $profile::logoutd::owner,
        group   => $profile::logoutd::group,
        mode    => '0550',
        source  => $source,
        content => $content,
    }
}