Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,7 @@ See in file [REFERENCE.md](REFERENCE.md).

### OS Support:

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 11, Debian 12, Ubuntu 22.04, Ubuntu 24.04
* FreeBSD family - tested on FreeBSD 12.2 (uses ports/pkgng Net-SNMP, not system bsnmpd)
* Darwin family - tested on Darwin 18 (macOS 10.14 "Mojave"), 19 (macOS 10.15 "Catalina"), and 20 (macOS 11.1 "Big Sur").
Net-SNMP module support is available for the operating systems listed in the [metadata.json](https://github.com/voxpupuli/puppet-snmp/blob/master/metadata.json) file.

### Notes:

Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"11",
"12",
"11"
"13"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/snmp_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@
# TRAPDOPTS begins being set by the package in Ubuntu 22.04; we should not log a failure
# in this case
case facts[:os]['release']['major']
when '11', '12'
when '11', '12', '13'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the whole case statement can go away now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it can. After simplification, this stays:

        describe 'manage_snmpdtrapd => false Debian' do
           let(:params) { { manage_snmptrapd: false } }
        end

I've no idea what it means, I don't speak ruby :/ So I'm unsure if this could disappear too.

Copy link

@Joris29 Joris29 Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means you try a test with with parameter manage_snmptrapd: false on Debian, this can stay

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like removing the case breaks things. I don't understand why :(

it { is_expected.to contain_file('snmpd.sysconfig').without_content(%r{TRAPDRUN|TRAPDOPTS}) }
end
end
Copy link

@Joris29 Joris29 Dec 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't really make a lot of sense to me as you don't test something specific for the parameter you set.
So either remove this whole describe block or actually test what the expected behavior would be.

In the describe block under let parameters you can add the following:
it { is_expected.not_to contain_systemd__dropin_file('snmptrapd.conf') }
it { is_expected.not_to contain_file('snmptrapd.sysconfig') }

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bastelfreak What are your thoughts on this?

Expand Down