Showing with 32 additions and 25 deletions.
  1. +6 −0 .puppet-lint.rc
  2. +4 −7 README.md
  3. +6 −6 metadata.json
  4. +8 −8 spec/classes/snmp_init_spec.rb
  5. +8 −4 templates/snmpd.conf.erb
6 changes: 6 additions & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--fail-on-warnings
--relative
--no-80chars-check
--no-class_inherits_from_params_class-check
--no-documentation-check
--no-single_quote_string_with_variables-check
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,10 @@ Notes
* For security reasons, the SNMP daemons are configured to listen on the loopback
interfaces (127.0.0.1 and [::1]). Use `agentaddress` and `snmptrapdaddr` to change this
configuration.
* [Traditional Access
Control](http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAK) is not fully
supported in this module. The parameters ro_community, rw_community,
ro_network, and rw_network will end up commented out in the snmpd.conf.
Instead use [VACM
Configuration](http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAL) via
parameters com2sec, groups, views, and accesses.
* Not all parts of [Traditional Access
Control](http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAK) or [VACM
Configuration](http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAL) are
fully supported in this module.

Issues
------
Expand Down
12 changes: 6 additions & 6 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "razorsedge-snmp",
"version": "3.3.0",
"version": "3.3.1",
"author": "razorsedge",
"summary": "Install and manage Net-SNMP services.",
"summary": "Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare of network and computer equipment. Net-SNMP implements SNMP v1, SNMP v2c, and SNMP v3 using both IPv4 and IPv6.",
"license": "Apache-2.0",
"project_page": "https://github.com/razorsedge/puppet-snmp",
"issues_url": "https://github.com/razorsedge/puppet-snmp/issues",
"source": "https://github.com/razorsedge/puppet-snmp.git",
"tags": [ "RHEL", "rhel", "OEL", "CentOS", "snmp", "monitoring", "debian", "ubuntu", "SuSE", "OpenSUSE", "FreeBSD" ],
"tags": [ "snmp", "net-snmp", "monitoring", "RHEL", "rhel", "OEL", "CentOS", "debian", "ubuntu", "SuSE", "OpenSUSE", "FreeBSD" ],
"dependencies": [
{
"name": "puppetlabs/stdlib",
Expand All @@ -17,15 +17,15 @@
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [ "5", "6" ]
"operatingsystemrelease": [ "5", "6", "7" ]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [ "5", "6" ]
"operatingsystemrelease": [ "5", "6", "7" ]
},
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [ "5", "6" ]
"operatingsystemrelease": [ "5", "6", "7" ]
},
{
"operatingsystem": "FreeBSD",
Expand Down
16 changes: 8 additions & 8 deletions spec/classes/snmp_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
it 'should contain File[snmpd.conf] with expected contents' do
verify_contents(subject, 'snmpd.conf', [
'agentaddress udp:127.0.0.1:161,udp6:[::1]:161',
'#rocommunity public 127.0.0.1',
'#rocommunity6 public ::1',
'rocommunity public 127.0.0.1',
'rocommunity6 public ::1',
'com2sec notConfigUser default public',
'com2sec6 notConfigUser default public',
'group notConfigGroup v1 notConfigUser',
Expand Down Expand Up @@ -181,8 +181,8 @@
it 'should contain File[snmpd.conf] with expected contents' do
verify_contents(subject, 'snmpd.conf', [
'agentaddress udp:127.0.0.1:161,udp6:[::1]:161',
'#rocommunity public 127.0.0.1',
'#rocommunity6 public ::1',
'rocommunity public 127.0.0.1',
'rocommunity6 public ::1',
'com2sec notConfigUser default public',
'com2sec6 notConfigUser default public',
'group notConfigGroup v1 notConfigUser',
Expand Down Expand Up @@ -286,8 +286,8 @@
it 'should contain File[snmpd.conf] with expected contents' do
verify_contents(subject, 'snmpd.conf', [
'agentaddress udp:127.0.0.1:161,udp6:[::1]:161',
'#rocommunity public 127.0.0.1',
'#rocommunity6 public ::1',
'rocommunity public 127.0.0.1',
'rocommunity6 public ::1',
'com2sec notConfigUser default public',
'com2sec6 notConfigUser default public',
'group notConfigGroup v1 notConfigUser',
Expand Down Expand Up @@ -396,8 +396,8 @@
it 'should contain File[snmpd.conf] with expected contents' do
verify_contents(subject, 'snmpd.conf', [
'agentaddress udp:127.0.0.1:161,udp6:[::1]:161',
'#rocommunity public 127.0.0.1',
'#rocommunity6 public ::1',
'rocommunity public 127.0.0.1',
'rocommunity6 public ::1',
'com2sec notConfigUser default public',
'com2sec6 notConfigUser default public',
'group notConfigGroup v1 notConfigUser',
Expand Down
12 changes: 8 additions & 4 deletions templates/snmpd.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ agentaddress <%= @agentaddress.join(',') %>

# ------------------------------------------------------------------------------
# Traditional Access Control
#rocommunity <%= @ro_community %> <%= @ro_network %>
#rocommunity6 <%= @ro_community6 %> <%= @ro_network6 %>
<% if @ro_community -%>
rocommunity <%= @ro_community %> <%= @ro_network %>
<% end -%>
<% if @ro_community6 -%>
rocommunity6 <%= @ro_community6 %> <%= @ro_network6 %>
<% end -%>
<% if @rw_community -%>
#rwcommunity <%= @rw_community %> <%= @rw_network %>
rwcommunity <%= @rw_community %> <%= @rw_network %>
<% end -%>
<% if @rw_community6 -%>
#rwcommmunity6 <%= @rw_community6 %> <%= @rw_network6 %>
rwcommmunity6 <%= @rw_community6 %> <%= @rw_network6 %>
<% end -%>

# ------------------------------------------------------------------------------
Expand Down