Skip to content

Commit

Permalink
Merge pull request #30 from Oefenweb/generates-hashes-are-not-being-r…
Browse files Browse the repository at this point in the history
…e-generated-on-debian

Fix for: generates hashes are not being re-generated on Debian
  • Loading branch information
tersmitten authored Jan 8, 2025
2 parents 75e1d66 + 3b86f58 commit f83e037
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
17 changes: 15 additions & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
# handlers file
---
- name: restart snmpd
- name: stop service

Check warning on line 3 in handlers/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in handlers/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.service:
name: snmpd
name: "{{ snmpd_service_name }}"
state: stopped
listen: restart snmpd

- name: remove persistent data file

Check warning on line 9 in handlers/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 9 in handlers/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.file:
path: /var/lib/snmp/snmpd.conf
state: absent
listen: restart snmpd

- name: restart service

Check warning on line 15 in handlers/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 15 in handlers/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.service:
name: "{{ snmpd_service_name }}"
state: restarted
listen: restart snmpd
when: service_default_state | default('started') == 'started'
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

- name: start and enable service
ansible.builtin.service:
name: snmpd
name: "{{ snmpd_service_name }}"
state: "{{ service_default_state | default('started') }}"
enabled: "{{ service_default_enabled | default(true) | bool }}"
tags:
Expand Down
2 changes: 2 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ snmpd_dependencies:
- snmpd
- snmp
- snmp-mibs-downloader

snmpd_service_name: snmpd

0 comments on commit f83e037

Please sign in to comment.