Skip to content

Commit

Permalink
Reorder and realign all parameters
Browse files Browse the repository at this point in the history
Attempt to group parameters that belong together.
Add data types to a couple of parameters (Booleans)
  • Loading branch information
vStone committed Nov 5, 2018
1 parent 2103646 commit 41b8986
Showing 1 changed file with 61 additions and 52 deletions.
113 changes: 61 additions & 52 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -305,68 +305,77 @@
# Copyright (C) 2012 Mike Arnold, unless otherwise noted.
#
class snmp (
Enum['present','absent'] $ensure = $snmp::params::ensure,
$agentaddress = $snmp::params::agentaddress,
Array[String[1]] $snmptrapdaddr = $snmp::params::snmptrapdaddr,
$ro_community = $snmp::params::ro_community,
$ro_community6 = $snmp::params::ro_community6,
$rw_community = $snmp::params::rw_community,
$rw_community6 = $snmp::params::rw_community6,
$ro_network = $snmp::params::ro_network,
$ro_network6 = $snmp::params::ro_network6,
$rw_network = $snmp::params::rw_network,
$rw_network6 = $snmp::params::rw_network6,
$contact = $snmp::params::contact,
$location = $snmp::params::location,
$sysname = $snmp::params::sysname,
$services = $snmp::params::services,
Array[String[1]] $com2sec = $snmp::params::com2sec,
Array[String[1]] $com2sec6 = $snmp::params::com2sec6,
Array[String[1]] $groups = $snmp::params::groups,
Array[String[1]] $views = $snmp::params::views,
Array[String[1]] $accesses = $snmp::params::accesses,
Array[String[1]] $dlmod = $snmp::params::dlmod,
Array[String[1]] $extends = $snmp::params::extends,
Array[String] $snmpd_config = $snmp::params::snmpd_config,
# Usage
Enum['present','absent'] $ensure = $snmp::params::ensure,
Boolean $autoupgrade = $snmp::params::autoupgrade,
Boolean $manage_client = $snmp::params::manage_client,
Optional[String] $snmpd_options = $snmp::params::snmpd_options,
Optional[String] $snmptrapd_options = $snmp::params::snmptrapd_options,

# Configuration
$agentaddress = $snmp::params::agentaddress,
Array[String[1]] $snmptrapdaddr = $snmp::params::snmptrapdaddr,
$ro_community = $snmp::params::ro_community,
$ro_community6 = $snmp::params::ro_community6,
$rw_community = $snmp::params::rw_community,
$rw_community6 = $snmp::params::rw_community6,
$ro_network = $snmp::params::ro_network,
$ro_network6 = $snmp::params::ro_network6,
$rw_network = $snmp::params::rw_network,
$rw_network6 = $snmp::params::rw_network6,
$contact = $snmp::params::contact,
$location = $snmp::params::location,
$sysname = $snmp::params::sysname,
$services = $snmp::params::services,
Array[String[1]] $com2sec = $snmp::params::com2sec,
Array[String[1]] $com2sec6 = $snmp::params::com2sec6,
Array[String[1]] $groups = $snmp::params::groups,
Array[String[1]] $views = $snmp::params::views,
Array[String[1]] $accesses = $snmp::params::accesses,
Array[String[1]] $dlmod = $snmp::params::dlmod,
Array[String[1]] $extends = $snmp::params::extends,
Boolean $openmanage_enable = $snmp::params::openmanage_enable,
Boolean $master = $snmp::params::master,
$agentx_perms = $snmp::params::agentx_perms,
$agentx_ping_interval = $snmp::params::agentx_ping_interval,
$agentx_socket = $snmp::params::agentx_socket,
Integer[0] $agentx_timeout = $snmp::params::agentx_timeout,
Integer[0] $agentx_retries = $snmp::params::agentx_retries,
Boolean $snmpv2_enable = $snmp::params::snmpv2_enable,
Enum['yes','no'] $disable_authorization = $snmp::params::disable_authorization,
Enum['yes','no'] $do_not_log_traps = $snmp::params::do_not_log_traps,
Enum['yes','no'] $do_not_log_tcpwrappers = $snmp::params::do_not_log_tcpwrappers,
Array[String[1]] $trap_handlers = $snmp::params::trap_handlers,
Array[String[1]] $trap_forwards = $snmp::params::trap_forwards,
Array[String] $snmptrapd_config = $snmp::params::snmptrapd_config,
Boolean $manage_client = $snmp::params::manage_client,
$snmp_config = $snmp::params::snmp_config,
Boolean $autoupgrade = $snmp::params::autoupgrade,
String[1] $package_name = $snmp::params::package_name,
Optional[String] $snmptrapd_package_name = $snmp::params::snmptrapd_package_name,
$snmpd_options = $snmp::params::snmpd_options,
Stdlib::Filemode $service_config_perms = $snmp::params::service_config_perms,
String[1] $service_config_dir_group = $snmp::params::service_config_dir_group,
Stdlib::Ensure::Service $service_ensure = $snmp::params::service_ensure,
String[1] $service_name = $snmp::params::service_name,
Boolean $service_enable = $snmp::params::service_enable,
Boolean $service_hasstatus = $snmp::params::service_hasstatus,
Boolean $service_hasrestart = $snmp::params::service_hasrestart,
Optional[String] $snmptrapd_options = $snmp::params::snmptrapd_options,
Array[String[1]] $trap_handlers = $snmp::params::trap_handlers,
Array[String[1]] $trap_forwards = $snmp::params::trap_forwards,
# manual config overrides. Added to templates as is.
Array[String] $snmp_config = $snmp::params::snmp_config,
Array[String] $snmpd_config = $snmp::params::snmpd_config,
Array[String] $snmptrapd_config = $snmp::params::snmptrapd_config,

# (Advanced) System configuration
Stdlib::Filemode $service_config_perms = $snmp::params::service_config_perms,
String[1] $service_config_dir_group = $snmp::params::service_config_dir_group,
# snmpd
String[1] $package_name = $snmp::params::package_name,
Stdlib::Ensure::Service $service_ensure = $snmp::params::service_ensure,
String[1] $service_name = $snmp::params::service_name,
Boolean $service_enable = $snmp::params::service_enable,
Boolean $service_hasstatus = $snmp::params::service_hasstatus,
Boolean $service_hasrestart = $snmp::params::service_hasrestart,
# snmptrapd
Optional[String[1]] $snmptrapd_package_name = $snmp::params::snmptrapd_package_name,
Stdlib::Ensure::Service $trap_service_ensure = $snmp::params::trap_service_ensure,
$trap_service_name = $snmp::params::trap_service_name,
$trap_service_enable = $snmp::params::trap_service_enable,
$trap_service_hasstatus = $snmp::params::trap_service_hasstatus,
$trap_service_hasrestart = $snmp::params::trap_service_hasrestart,
String[1] $trap_service_name = $snmp::params::trap_service_name,
Boolean $trap_service_enable = $snmp::params::trap_service_enable,
Boolean $trap_service_hasstatus = $snmp::params::trap_service_hasstatus,
Boolean $trap_service_hasrestart = $snmp::params::trap_service_hasrestart,
# (Super Advanced) template overrides
String[1] $template_snmpd_conf = $snmp::params::template_snmpd_conf,
String[1] $template_snmpd_sysconfig = $snmp::params::template_snmpd_sysconfig,
String[1] $template_snmpd_systemd_dropin = $snmp::params::template_snmpd_systemd_dropin,
String[1] $template_snmptrapd = $snmp::params::template_snmptrapd,
String[1] $template_snmptrapd_sysconfig = $snmp::params::template_snmptrapd_sysconfig,
String[1] $template_snmptrapd_systemd_dropin = $snmp::params::template_snmptrapd_systemd_dropin,
Boolean $openmanage_enable = $snmp::params::openmanage_enable,
Boolean $master = $snmp::params::master,
$agentx_perms = $snmp::params::agentx_perms,
$agentx_ping_interval = $snmp::params::agentx_ping_interval,
$agentx_socket = $snmp::params::agentx_socket,
Integer[0] $agentx_timeout = $snmp::params::agentx_timeout,
Integer[0] $agentx_retries = $snmp::params::agentx_retries,
Boolean $snmpv2_enable = $snmp::params::snmpv2_enable,
) inherits snmp::params {

if $ensure == 'present' {
Expand Down

0 comments on commit 41b8986

Please sign in to comment.