Skip to content
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

Possibility not to install snmptrapd #207

Open
3c2b2ff5 opened this issue Sep 30, 2019 · 5 comments
Open

Possibility not to install snmptrapd #207

3c2b2ff5 opened this issue Sep 30, 2019 · 5 comments

Comments

@3c2b2ff5
Copy link

3c2b2ff5 commented Sep 30, 2019

Hi,

this is not an issue as though. But I would like to be able to install snmpd without snmptarp. It seems include snmp or class { 'snmp': } will always install snmptrap as well along with snmpd.
How can I prevent installing the snmptrap?

Thanks

@3c2b2ff5 3c2b2ff5 changed the title Possibility to install either snmp service, snmpd or snmptrapd Possibility not to install snmptrapd Sep 30, 2019
@davidjmemmett
Copy link

I can't get past this issue either, on Ubuntu 18.04, I get the following error:

Dec  2 14:12:08 puppet-test puppet-agent[10599]: (/Stage[main]/Snmp/Package[snmptrapd]/ensure) change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install snmptrapd' returned 100: Reading package lists...
Dec  2 14:12:08 puppet-test puppet-agent[10599]: (/Stage[main]/Snmp/Package[snmptrapd]/ensure) Building dependency tree...
Dec  2 14:12:08 puppet-test puppet-agent[10599]: (/Stage[main]/Snmp/Package[snmptrapd]/ensure) Reading state information...
Dec  2 14:12:08 puppet-test puppet-agent[10599]: (/Stage[main]/Snmp/Package[snmptrapd]/ensure) Package snmptrapd is not available, but is referred to by another package.
Dec  2 14:12:08 puppet-test puppet-agent[10599]: (/Stage[main]/Snmp/Package[snmptrapd]/ensure) This may mean that the package is missing, has been obsoleted, or
Dec  2 14:12:08 puppet-test puppet-agent[10599]: (/Stage[main]/Snmp/Package[snmptrapd]/ensure) is only available from another source
Dec  2 14:12:08 puppet-test puppet-agent[10599]: (/Stage[main]/Snmp/Package[snmptrapd]/ensure)
Dec  2 14:12:08 puppet-test puppet-agent[10599]: (/Stage[main]/Snmp/Package[snmptrapd]/ensure) E: Package 'snmptrapd' has no installation candidate
Dec  2 14:12:08 puppet-test puppet-agent[10599]: (/Stage[main]/Snmp/File[snmptrapd.sysconfig]) Dependency Package[snmptrapd] has failures: true
Dec  2 14:12:08 puppet-test puppet-agent[10599]: (/Stage[main]/Snmp/File[snmptrapd.sysconfig]) Skipping because of failed dependencies
Dec  2 14:12:08 puppet-test puppet-agent[10599]: (/Stage[main]/Snmp/Service[snmptrapd]) Skipping because of failed dependencies
Dec  2 14:12:08 puppet-test puppet-agent[10599]: Applied catalog in 0.16 seconds

@alaunay
Copy link

alaunay commented Apr 18, 2020

In the module file:
data/os/Debian/18.04.yaml

If you add a line:
snmp::snmptrapd_package_name: ~

snmptrapd won't be installed.

Not perfect though, I'd very much like not to touch the module :/

@ubellavance
Copy link

@alaunay have you tried putting this line in your relevant hiera yaml file? If you don't use hiera, you can set this in your manifest

snmptrapd_package_name        => undef,

@alaunay
Copy link

alaunay commented Apr 18, 2020

Hello @ubellavance , yes, I tried. It seems it's superseded by the hiera data from the module. I did not try /that/ hard though, so I'm not 100% sure. I'm sure that by adding a 7.yaml in the same directory as 18.04 or 9, with the line above, it does the trick (Debian Wheezy does not have a separated snmptrapd package, and yes, I still have a few of those).

@ubellavance
Copy link

Maybe you should create a separate issue for that... I'm not a super-pro with Puppet but that sure looks weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants