create file if not existent
This commit is contained in:
@@ -22,16 +22,10 @@
|
|||||||
owner: "root"
|
owner: "root"
|
||||||
group: "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
|
- name: server | snmpd | insert anchors to snmpd.conf
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: "{{ snmpd_conf }}"
|
path: "{{ snmpd_conf }}"
|
||||||
|
create: true
|
||||||
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
||||||
block: |
|
block: |
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user