Puppet Function: ssh::add_sshd_config

Defined in:
functions/add_sshd_config.pp
Function type:
Puppet Language

Overview

ssh::add_sshd_config(String[1] $key, Any $value, Variant[Array[String[1]],Undef] $remove_keys)Nil

Add a sshd_config entry if it is not in the remove list

Parameters:

  • key (String[1])

    The name of the sshd configuration parameter

  • value (Any)

    The value of the sshd configuration parameter

  • remove_keys (Variant[Array[String[1]],Undef])

    List of sshd configuration parameters to be removed

Returns:

  • (Nil)


9
10
11
12
13
14
15
16
17
18
19
20
# File 'functions/add_sshd_config.pp', line 9

function ssh::add_sshd_config(
  String[1]                       $key,
  Any                             $value,
  Variant[Array[String[1]],Undef] $remove_keys
) {

  $_add = ( $remove_keys == undef ) or ( !member($remove_keys, $key) )

  if $_add {
    sshd_config { $key: value => $value }
  }
}