Defined Type: security::access::config

Defined in:
modules/security/manifests/access/config.pp

Overview

Parameters:

  • ensure (Wmflib::Ensure) (defaults to: 'present')
  • content (Optional[String]) (defaults to: undef)
  • source (Optional[String]) (defaults to: undef)
  • priority (Integer[0,99]) (defaults to: 50)


39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'modules/security/manifests/access/config.pp', line 39

define security::access::config(
    Wmflib::Ensure   $ensure   = 'present',
    Optional[String] $content  = undef,
    Optional[String] $source   = undef,
    Integer[0,99]    $priority = 50,
)
{
    include security::access
    $safe_title = $title.regsubst('\W', '_', 'G')
    $file_path  = "/etc/security/access.conf.d/%.2d-${safe_title}".sprintf($priority)

    file { $file_path:
        ensure  => $ensure,
        source  => $source,
        content => $content,
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
        require => File['/etc/security/access.conf.d'],
        notify  => Exec['merge-access-conf'],
    }
}