Merge branch 'dev'

This commit is contained in:
rene
2022-03-24 16:07:12 +01:00
45 changed files with 859 additions and 26 deletions

View File

@@ -17,7 +17,7 @@
- name: server | snmpd | insert anchors to snmpd.conf
blockinfile:
path: "/etc/snmp/snmpd.conf"
path: "{{ snmpd_conf }}"
marker: "# {mark} ANSIBLE MANAGED BLOCK" # not required. The marker line template. C({mark}) will be replaced with the values C(in marker_begin) (default="BEGIN") and C(marker_end) (default="END"). Using a custom marker without the C({mark}) variable may result in the block being repeatedly inserted on subsequent playbook runs.
block: |
################################################################################
@@ -35,13 +35,13 @@
- name: server | snmpd | setup ACLs
lineinfile:
path: "/etc/snmp/snmpd.conf" # required. The file to modify. Before Ansible 2.3 this option was only usable as I(dest), I(destfile) and I(name).
path: "{{ snmpd_conf }}" # required. The file to modify. Before Ansible 2.3 this option was only usable as I(dest), I(destfile) and I(name).
line: "rouser {{snmp_user }} authpriv"
insertafter: "# SECTION: custom settings"
- name: server | snmpd | enable service on wireguard interface
lineinfile:
path: "/etc/snmp/snmpd.conf"
path: "{{ snmpd_conf }}"
regexp: "^agentaddress.*$"
state: present
line: "agentaddress 127.0.0.1,{{ wg_local_ip | ipaddr('address') }},[::1]"
@@ -49,7 +49,7 @@
- name: server | snmpd | enable service on all interfaces
lineinfile:
path: "/etc/snmp/snmpd.conf"
path: "{{ snmpd_conf }}"
regexp: "^agentaddress.*$"
state: present
line: "agentaddress udp:161,udp6:[::1]:161"
@@ -71,7 +71,7 @@
- name: server | snmpd | configure extends
lineinfile:
path: "/etc/snmp/snmpd.conf"
path: "{{ snmpd_conf }}"
state: present
line: "extend {{ item.service }} '{{ item.script }}'"
insertafter: "# SECTION: custom settings"