diff --git a/playbooks/snmpd.yml b/playbooks/snmpd.yml deleted file mode 100755 index b62fe38..0000000 --- a/playbooks/snmpd.yml +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ansible-playbook ---- -- hosts: - - edge-1.rtr.infra.auro.re - vars: - snmpd__sys_contact: root@auro.re - snmpd__views: - systemonly: - - .1.3.6.1.2.1.1 - - .1.3.6.1.2.1.25.1 - snmpd__users: - aurore: - auth: "{{ vault_snmp_aurore_auth }}" - priv: "{{ vault_snmp_aurore_priv }}" - view: systemonly - roles: - - snmpd -... diff --git a/roles/snmpd/defaults/main.yml b/roles/snmpd/defaults/main.yml deleted file mode 100644 index ada5794..0000000 --- a/roles/snmpd/defaults/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -snmpd__sys_name: "{{ inventory_hostname }}" -snmpd__sys_location: Unknown -snmpd__sys_services: 72 -snmpd__views: {} -snmpd__users: {} -... diff --git a/roles/snmpd/handlers/main.yml b/roles/snmpd/handlers/main.yml deleted file mode 100644 index 4695936..0000000 --- a/roles/snmpd/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- name: Restart snmpd - systemd: - name: snmpd.service - state: restarted -... diff --git a/roles/snmpd/tasks/main.yml b/roles/snmpd/tasks/main.yml deleted file mode 100644 index 0ca2c45..0000000 --- a/roles/snmpd/tasks/main.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -- name: Install snmpd - apt: - name: snmpd - -- name: Configure snmpd - template: - src: snmpd.conf.j2 - dest: /etc/snmp/snmpd.conf - owner: root - group: root - mode: u=rw,g=,o= - no_log: true - notify: - - Restart snmpd - -- name: Enable snmpd - systemd: - name: snmpd.service - enabled: true -... diff --git a/roles/snmpd/templates/snmpd.conf.j2 b/roles/snmpd/templates/snmpd.conf.j2 deleted file mode 100644 index fb017ab..0000000 --- a/roles/snmpd/templates/snmpd.conf.j2 +++ /dev/null @@ -1,22 +0,0 @@ -{{ ansible_managed | comment }} - -sysName {{ snmpd__sys_name }} -sysLocation {{ snmpd__sys_location }} -sysContact {{ snmpd__sys_contact }} -sysServices {{ snmpd__sys_services }} - -master agentx -agentaddress 127.0.0.1,[::1] - -{% for view, included in snmpd__views.items() %} -{% for oid in included %} -view {{ view }} included {{ oid }} -{% endfor %} -{% endfor %} - -{% for name, user in snmpd__users.items() %} -createUser {{ name }} SHA-512 {{ user.auth | enquote }} AES {{ user.priv | enquote }} -rouser {{ name }} authpriv -V {{ user.view }} -{% endfor %} - -includeDir /etc/snmp/snmpd.conf.d