From 6e5f7ff1fc9520f461a610b13b93b6984be4b960 Mon Sep 17 00:00:00 2001 From: Anton Dollmaier Date: Sat, 25 Jan 2020 17:24:04 +0000 Subject: [PATCH 1/2] Support Debian 10 - copied hiera from Debian 9 - updated Travis to support Debian 10 - updated spec --- .sync.yml | 3 ++- .travis.yml | 12 ++++++++++-- data/os/Debian/10.yaml | 4 ++++ metadata.json | 3 ++- spec/classes/snmp_init_spec.rb | 4 ++-- 5 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 data/os/Debian/10.yaml diff --git a/.sync.yml b/.sync.yml index dd10c683..05438152 100644 --- a/.sync.yml +++ b/.sync.yml @@ -5,6 +5,7 @@ - set: ubuntu1604-64 - set: centos7-64 - set: centos6-64 - - set: debian9-64 - set: debian8-64 + - set: debian9-64 + - set: debian10-64 secure: "IdEJp5VThHh+3f+EKA1mRtJva+QPZLMJ/8t+y/xNfmOQzT7tx5z0JAON01GBwa9vfsu5uuI1mnnXIJzMJiY7TNl4ogejQoHK/IYKHHqxVq4lerIcCk/eZCpSy1gMOot6+yfoR42n6oiDbXxu638QtCO80KC/S+4TMA6I+QRHw/Y=" diff --git a/.travis.yml b/.travis.yml index 922e58bd..2c2a0034 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,6 +54,14 @@ matrix: bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos6-64 BEAKER_HYPERVISOR=docker CHECK=beaker services: docker + - rvm: 2.5.3 + bundler_args: --without development release + env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker + services: docker + - rvm: 2.5.3 + bundler_args: --without development release + env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker + services: docker - rvm: 2.5.3 bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker @@ -64,11 +72,11 @@ matrix: services: docker - rvm: 2.5.3 bundler_args: --without development release - env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker + env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian10-64 BEAKER_HYPERVISOR=docker CHECK=beaker services: docker - rvm: 2.5.3 bundler_args: --without development release - env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker + env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian10-64 BEAKER_HYPERVISOR=docker CHECK=beaker services: docker branches: only: diff --git a/data/os/Debian/10.yaml b/data/os/Debian/10.yaml new file mode 100644 index 00000000..a6c12c9a --- /dev/null +++ b/data/os/Debian/10.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 ec659539..6fbd3676 100644 --- a/metadata.json +++ b/metadata.json @@ -50,7 +50,8 @@ "operatingsystem": "Debian", "operatingsystemrelease": [ "8", - "9" + "9", + "10" ] }, { diff --git a/spec/classes/snmp_init_spec.rb b/spec/classes/snmp_init_spec.rb index bc78828b..b6a195bb 100644 --- a/spec/classes/snmp_init_spec.rb +++ b/spec/classes/snmp_init_spec.rb @@ -607,7 +607,7 @@ end case facts[:os]['release']['major'] - when '9', '18.04' + when '9', '10', '18.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', [ @@ -646,7 +646,7 @@ end case facts[:os]['release']['major'] - when '8', '9', '16.04', '18.04' + when '8', '9', '10', '16.04', '18.04' describe 'service_ensure => stopped and trap_service_ensure => running' do let :params do { From d49cc8dc55134d3fe6de74426d9520fa3606aa97 Mon Sep 17 00:00:00 2001 From: Anton Dollmaier Date: Sat, 25 Jan 2020 18:11:35 +0000 Subject: [PATCH 2/2] fix missing test for Debian Buster --- spec/classes/snmp_init_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/classes/snmp_init_spec.rb b/spec/classes/snmp_init_spec.rb index b6a195bb..6a3d636a 100644 --- a/spec/classes/snmp_init_spec.rb +++ b/spec/classes/snmp_init_spec.rb @@ -576,7 +576,7 @@ ).that_requires('Package[snmpd]').that_notifies('Service[snmpd]') } case facts[:os]['release']['major'] - when '8', '9', '16.04', '18.04' + when '8', '9', '10', '16.04', '18.04' it { is_expected.to contain_file('snmptrapd.sysconfig').with( ensure: 'present',