Puppet Class: sssd::base_config

Inherits:
sssd
Defined in:
manifests/base_config.pp

Summary

ensure packages match our expected state

Overview

Parameters:

  • config_manage (Any) (defaults to: $sssd::config_manage)

    Should we manage the config?

  • main_config_dir (Any) (defaults to: $sssd::main_config_dir)

    This is probably /etc/sssd on your system

  • main_config_file (Any) (defaults to: $sssd::main_config_file)

    This is probably /etc/sssd/sssd.conf on your system

  • config_d_location (Any) (defaults to: $sssd::config_d_location)

    This is probably /etc/sssd/conf.d on your system

  • purge_unmanaged_conf_d (Any) (defaults to: $sssd::purge_unmanaged_conf_d)

    Should we remove any files unknown to puppet in the conf_d location?

  • config_owner (Any) (defaults to: $sssd::config_owner)

    Owner for the config files - should be ‘root’

  • config_group (Any) (defaults to: $sssd::config_group)

    Group for the config files - should be ‘root’

  • config_mode (Any) (defaults to: $sssd::config_mode)

    chmod for the config files - should be ‘0600’

  • main_config (Any) (defaults to: $sssd::main_config)

    Hash containing the content of $main_config_file broken out by section Entries in $config_d_location can replace these elements in a last file wins methodology.

  • configs (Any) (defaults to: $sssd::configs)

    A Hash similar to $main_config, but with one more level of nesting ‘any text you want’:

    section:
      key: value
    
  • main_pki_dir (Any) (defaults to: $sssd::main_pki_dir)
  • pki_owner (Any) (defaults to: $sssd::pki_owner)
  • pki_group (Any) (defaults to: $sssd::pki_group)
  • pki_mode (Any) (defaults to: $sssd::pki_mode)


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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'manifests/base_config.pp', line 30

class sssd::base_config (
  # lint:ignore:parameter_types
  $config_manage  = $sssd::config_manage,
  $main_config_dir = $sssd::main_config_dir,
  $main_config_file = $sssd::main_config_file,
  $main_pki_dir = $sssd::main_pki_dir,
  $config_d_location = $sssd::config_d_location,
  $purge_unmanaged_conf_d = $sssd::purge_unmanaged_conf_d,
  $pki_owner = $sssd::pki_owner,
  $pki_group = $sssd::pki_group,
  $pki_mode = $sssd::pki_mode,
  $config_owner = $sssd::config_owner,
  $config_group = $sssd::config_group,
  $config_mode = $sssd::config_mode,
  $main_config = $sssd::main_config,
  $configs = $sssd::configs,
  # lint:endignore
) inherits sssd {
  assert_private()

  if $config_manage {
    file { $main_config_dir:
      ensure => 'directory',
      owner  => $config_owner,
      group  => $config_group,
      mode   => $config_mode,
    }

    file { $main_pki_dir:
      ensure => 'directory',
      owner  => $pki_owner,
      group  => $pki_group,
      mode   => $pki_mode,
    }

    file { $config_d_location:
      ensure  => 'directory',
      owner   => $config_owner,
      group   => $config_group,
      mode    => $config_mode,
      recurse => $purge_unmanaged_conf_d,
      purge   => $purge_unmanaged_conf_d,
    }

    sssd::config { $main_config_file:
      owner               => $config_owner,
      group               => $config_group,
      mode                => $config_mode,
      stanzas             => $main_config,
      force_this_filename => $main_config_file,
    }

    # lint:ignore:140chars
    create_resources(sssd::config, $configs, { 'owner' => $config_owner, 'group' => $config_group, 'mode' => $config_mode })
    # lint:endignore
  }
}