Defined Type: pf::authpf::ban

Defined in:
manifests/authpf/ban.pp

Overview

Explicitly ban user access.

Examples:

Ban a user

include ::pf::authpf
::pf::authpf::ban { 'alice':
  content => @(EOS/L),
    You have violated the access policy!
    | EOS
}

Parameters:

  • content (String)
  • user (String) (defaults to: $title)

See Also:

Since:

  • 1.0.0



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'manifests/authpf/ban.pp', line 17

define pf::authpf::ban (
  String $content,
  String $user    = $title,
) {

  if ! defined(Class['::pf::authpf']) {
    fail('You must include the pf::authpf base class before using any pf::authpf defined resources')
  }

  file { "${::pf::authpf::conf_dir}/banned/${user}":
    ensure  => file,
    owner   => 0,
    group   => 0,
    mode    => '0644',
    content => $content,
  }
}