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

Fix for: generates hashes are not being re-generated on Debian #30

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
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.
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.
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.
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
@@ -1,6 +1,6 @@
# tasks file
---
- name: install dependencies

Check warning on line 3 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.apt:
name: "{{ snmpd_dependencies }}"
state: "{{ apt_install_state | default('latest') }}"
Expand All @@ -11,7 +11,7 @@
- snmpd
- snmpd-dependencies

- name: install

Check warning on line 14 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.apt:
name: "{{ snmpd_install }}"
state: "{{ apt_install_state | default('latest') }}"
Expand All @@ -20,7 +20,7 @@
- snmpd
- snmpd-install

- name: update configuration file - /etc/default/snmpd.conf

Check warning on line 23 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.template:
src: etc/default/snmpd.j2
dest: /etc/default/snmpd
Expand Down 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
Loading