create file if not existent

This commit is contained in:
2022-07-07 23:31:11 +02:00
parent 854e986140
commit 85e255ee24

View File

@@ -22,16 +22,10 @@
owner: "root"
group: "root"
- name: server | snmpd | create /etc/snmp/snmpd.conf
file:
path: "/etc/snmp/snmpd.conf"
state: file
owner: "root"
group: "root"
- name: server | snmpd | insert anchors to snmpd.conf
blockinfile:
path: "{{ snmpd_conf }}"
create: true
marker: "# {mark} ANSIBLE MANAGED BLOCK"
block: |
################################################################################