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

Stop the service and remove the /var/lib/snmp/snmpd.conf before editing the config files #28

Closed
wants to merge 1 commit into from
Closed
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
14 changes: 14 additions & 0 deletions 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,21 @@
- snmpd
- snmpd-install

- name: stop the snmp service for editing

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.service:
name: snmpd
state: "stopped"
tags:
- configuration
- snmpd
- snmpd-start-stop-service

- name: delete the old snmp /var/lib/snmp/snmpd.conf

Check warning on line 32 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.file:
state: absent
path: /var/lib/snmp/snmpd.conf

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

Check warning on line 37 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
Loading