diff --git a/.fixtures.yml b/.fixtures.yml index bc259d86..551760da 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,4 +1,4 @@ fixtures: repositories: stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git' - systemd: 'https://github.com/camptocamp/puppet-systemd.git' + systemd: 'https://github.com/voxpupuli/puppet-systemd.git' diff --git a/README.md b/README.md index 10320719..cd845177 100644 --- a/README.md +++ b/README.md @@ -262,7 +262,7 @@ Net-SNMP module support is available with these operating systems: * RedHat family - tested on CentOS 7 * SuSE family - tested on SLES 11 SP1 -* Debian family - tested on Debian 8, Debian 9, Ubuntu 14.04, Ubuntu 16.04, Ubuntu 18.04 +* Debian family - tested on Debian 9, Debian 10, Ubuntu 18.04, Ubuntu 20.04 ### Notes: diff --git a/data/os/Debian/20.04.yaml b/data/os/Debian/20.04.yaml new file mode 100644 index 00000000..a6c12c9a --- /dev/null +++ b/data/os/Debian/20.04.yaml @@ -0,0 +1,4 @@ +--- +snmp::snmpd_options: "-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux -p /var/run/snmpd.pid" +snmp::varnetsnmp_group: 'Debian-snmp' +snmp::varnetsnmp_owner: 'Debian-snmp' diff --git a/metadata.json b/metadata.json index d0108c07..9b727042 100644 --- a/metadata.json +++ b/metadata.json @@ -18,7 +18,7 @@ "version_requirement": ">= 5.2.0 < 8.0.0" }, { - "name": "camptocamp/systemd", + "name": "puppet/systemd", "version_requirement": ">= 2.5.1 < 4.0.0" } ], @@ -50,7 +50,6 @@ { "operatingsystem": "Debian", "operatingsystemrelease": [ - "8", "9", "10" ] @@ -58,8 +57,8 @@ { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ - "16.04", - "18.04" + "18.04", + "20.04" ] } ], diff --git a/spec/classes/snmp_init_spec.rb b/spec/classes/snmp_init_spec.rb index 7dbc02ae..ea937feb 100644 --- a/spec/classes/snmp_init_spec.rb +++ b/spec/classes/snmp_init_spec.rb @@ -607,7 +607,7 @@ ).that_requires('Package[snmpd]').that_notifies('Service[snmpd]') } case facts[:os]['release']['major'] - when '8', '9', '10', '16.04', '18.04' + when '8', '9', '10', '16.04', '18.04', '20.04' it { is_expected.to contain_file('snmptrapd.sysconfig').with( ensure: 'present', @@ -674,7 +674,7 @@ ).that_requires('Package[snmpd]') } end - when '18.04' + when '18.04', '20.04' describe 'Debian-snmp as snmp user' do it 'contains File[snmpd.sysconfig] with contents "SNMPDOPTS="-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux -p /var/run/snmpd.pid""' do verify_contents(catalogue, 'snmpd.sysconfig', [ @@ -712,46 +712,25 @@ end end - case facts[:os]['release']['major'] - when '8', '9', '10', '16.04', '18.04' - describe 'service_ensure => stopped and trap_service_ensure => running' do - let :params do - { - service_ensure: 'stopped', - trap_service_ensure: 'running' - } - end - - it { is_expected.to contain_service('snmpd').with_ensure('running') } - it { is_expected.to contain_service('snmptrapd').with_ensure('running') } - it 'contains File[snmpd.sysconfig] with content "SNMPDRUN=no"' do - verify_contents(catalogue, 'snmpd.sysconfig', [ - 'SNMPDRUN=no' - ]) - end - it 'contains File[snmptrapd.sysconfig] with content "TRAPDRUN=yes"' do - verify_contents(catalogue, 'snmptrapd.sysconfig', [ - 'TRAPDRUN=yes' - ]) - end + describe 'service_ensure => stopped and trap_service_ensure => running' do + let :params do + { + service_ensure: 'stopped', + trap_service_ensure: 'running' + } end - else - describe 'service_ensure => stopped and trap_service_ensure => running' do - let :params do - { - service_ensure: 'stopped', - trap_service_ensure: 'running' - } - end - it { is_expected.to contain_service('snmpd').with_ensure('running') } - it { is_expected.not_to contain_service('snmptrapd') } - it 'contains File[snmpd.sysconfig] with contents "SNMPDRUN=no" and "TRAPDRUN=yes"' do - verify_contents(catalogue, 'snmpd.sysconfig', [ - 'SNMPDRUN=no', - 'TRAPDRUN=yes' - ]) - end + it { is_expected.to contain_service('snmpd').with_ensure('running') } + it { is_expected.to contain_service('snmptrapd').with_ensure('running') } + it 'contains File[snmpd.sysconfig] with content "SNMPDRUN=no"' do + verify_contents(catalogue, 'snmpd.sysconfig', [ + 'SNMPDRUN=no' + ]) + end + it 'contains File[snmptrapd.sysconfig] with content "TRAPDRUN=yes"' do + verify_contents(catalogue, 'snmptrapd.sysconfig', [ + 'TRAPDRUN=yes' + ]) end end