-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable snmpv2 #128
Disable snmpv2 #128
Changes from all commits
e7b950e
16ef80f
74ae873
34d4b10
38a68a2
1e4553c
1941e67
52d200a
4ba2a2c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,6 +257,11 @@ | |
# Defines the number of retries for an AgentX request. | ||
# Default: 5 | ||
# | ||
# [*snmpv2_enable*] | ||
# Disable com2sec, group, and access in snmpd.conf | ||
# | ||
# Default: true | ||
# | ||
# === Actions: | ||
# | ||
# Installs the Net-SNMP daemon package, service, and configuration. | ||
|
@@ -353,6 +358,7 @@ | |
$agentx_socket = $snmp::params::agentx_socket, | ||
$agentx_timeout = $snmp::params::agentx_timeout, | ||
$agentx_retries = $snmp::params::agentx_retries, | ||
$snmpv2_enable = $snmp::params::snmpv2_enable, | ||
) inherits snmp::params { | ||
# Validate our booleans | ||
validate_bool($master) | ||
|
@@ -362,6 +368,7 @@ | |
validate_bool($service_hasstatus) | ||
validate_bool($service_hasrestart) | ||
validate_bool($openmanage_enable) | ||
validate_bool($snmpv2_enable) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please do not add the legacy validate_* methods. Datatypes are the new way to go \o/ |
||
|
||
# Validate our arrays | ||
validate_array($snmptrapdaddr) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -404,6 +404,13 @@ | |
$safe_trap_service_hasrestart = $trap_service_hasrestart | ||
} | ||
|
||
$snmp_snmpv2_enable = getvar('::snmpv2_enable') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do you use |
||
if $snmp_openmanage_enable { | ||
$snmpv2_enable = $snmp_snmpv2_enable | ||
} else { | ||
$snmpv2_enable = true | ||
} | ||
|
||
$template_snmpd_conf = 'snmp/snmpd.conf.erb' | ||
$template_snmpd_sysconfig = "snmp/snmpd.sysconfig-${::osfamily}.erb" | ||
$template_snmptrapd = 'snmp/snmptrapd.conf.erb' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a datatype to this?