Defined Type: ferm::conf

Defined in:
modules/ferm/manifests/conf.pp

Overview

defines a ferm config snippet

Parameters:

  • source (Any) (defaults to: undef)
  • content (Any) (defaults to: undef)
  • ensure (Any) (defaults to: present)
  • prio (Any) (defaults to: '10')


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'modules/ferm/manifests/conf.pp', line 2

define ferm::conf(
    $source  = undef,
    $content = undef,
    $ensure  = present,
    $prio    = '10',
) {
    if $source == undef and $content == undef {
        fail('Either source or content attribute needs to be given')
    }
    if $source != undef and $content != undef {
        fail('Both source and content attribute have been defined')
    }
    @file { "/etc/ferm/conf.d/${prio}_${name}":
        ensure  => $ensure,
        owner   => 'root',
        group   => 'root',
        mode    => '0400',
        source  => $source,
        content => $content,
        require => File['/etc/ferm/conf.d'],
        notify  => Service['ferm'],
        tag     => 'ferm',
    }
}