Puppet Class: confdroid_ssh::params

Summary

Class contains all class parameters for confdroid_ssh

Overview

confdroid_ssh::params.pp Module name: confdroid_ssh Author: 12ww1160 (12ww1160@confdroid.com)

Parameters:

  • ssh_reqpackages (Array) (defaults to: ['openssh','openssh-clients','openssh-server'])

    packages to install

  • pkg_ensure (String) (defaults to: 'present')

    version to install: ‘present’ or ‘latest’

  • ssh_use_firewall (Boolean) (defaults to: true)

    whether to manage firewall settings

  • ssh_fw_port (String) (defaults to: '22')

    port to use for SSHD and in fw

  • ssh_fw_order (String) (defaults to: '50')

    order of firewall rule

  • ssh_source_range (String) (defaults to: '0.0.0.0/0')

    source range for firewall rule

  • ssh_manage_config (Boolean) (defaults to: true)

    whether to manage the configuration

  • ssh_address_family (String) (defaults to: 'any')

    AddressFamily setting for sshd_config

  • ssh_listen_address (String) (defaults to: '0.0.0.0')

    ListenAddress setting for sshd_config

  • ssh_root_login (String) (defaults to: 'prohibit-password')

    PermitRootLogin setting for sshd_config

  • ssh_strict_modes (String) (defaults to: 'yes')

    StrictModes setting for sshd_config

  • ssh_max_auth_tries (String) (defaults to: '6')

    MaxAuthTries setting for sshd_config

  • ssh_max_sessions (String) (defaults to: '10')

    MaxSessions setting for sshd_config



19
20
21
22
23
24
25
26
27
28
29
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
# File 'manifests/params.pp', line 19

class confdroid_ssh::params (

  Array $ssh_reqpackages      = ['openssh','openssh-clients','openssh-server'],
  String $pkg_ensure          = 'present',

  # firewall settings
  Boolean $ssh_use_firewall   = true,
  String $ssh_fw_port         = '22',
  String $ssh_fw_order        = '50',
  String $ssh_source_range    = '0.0.0.0/0',

  # main configuration 
  Boolean $ssh_manage_config  = true,
  String  $ssh_address_family = 'any',
  String  $ssh_listen_address = '0.0.0.0',
  String  $ssh_root_login     = 'prohibit-password',
  String  $ssh_strict_modes   = 'yes',
  String  $ssh_max_auth_tries = '6',
  String  $ssh_max_sessions    = '10',

) {
# default facts
  $fqdn                     = $facts['networking']['fqdn']
  $hostname                 = $facts['networking']['hostname']
  $domain                   = $facts['networking']['domain']
  $os_name                  = $facts['os']['name']
  $os_release               = $facts['os']['release']['major']

  $sshd_user                = 'root'
  $ssh_etc_path             = '/etc/ssh'
  $sshd_service             = 'sshd'
  $sshd_config_path         = "${ssh_etc_path}/sshd_config"
  $sshd_custom_path         = "${ssh_etc_path}/sshd_config.d"
  $sshd_custom_conf         = "${sshd_custom_path}/10-custom.conf"
  $sshd_custom_erb          = 'confdroid_ssh/sshd_custom_conf.erb'
  $sshd_config_erb          = 'confdroid_ssh/sshd_config.erb'
  $sshd_root_login_file     = "${sshd_custom_path}/01-permitrootlogin.conf"

  # includes must be last
  include confdroid_ssh::main::config
}