Skip to content

Commit 41cbbbc

Browse files
committed
feat: ensure file exists only changes when file is created
Merge branch 'patch-1' of https://github.com/Uelb/ansible-environment into develop closes #3
2 parents f12afd2 + 83c056d commit 41cbbbc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tasks/config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
owner: "{{ environment_file_owner }}"
77
group: "{{ environment_file_group }}"
88
state: touch
9+
register: touch_log
10+
changed_when: touch_log.diff.before.state != "file"
911

1012
- name: Remove previous values
1113
lineinfile:

0 commit comments

Comments
 (0)