simplefile/tasks/inner.yml
2018-08-30 22:24:54 +02:00

37 lines
1.3 KiB
YAML

---
- name: Create required directories
file:
dest: '{{ item.dest | dirname }}'
owner: '{{ item.owner | default(omit) }}'
group: '{{ item.group | default(omit) }}'
recurse: true
- name: Write file
copy:
attributes: '{{ item.attributes | default(omit) }}'
backup: '{{ item.backup | default(omit) }}'
content: '{{ item.content | default(omit) }}'
decrypt: '{{ item.decrypt | default(omit) }}'
dest: '{{ item.dest }}'
directory_mode: '{{ item.directory_mode | default(omit) }}'
follow: '{{ item.follow | default(omit) }}'
force: '{{ item.force | default(omit) }}'
group: '{{ item.group | default(omit) }}'
local_follow: '{{ item.local_follow | default(omit) }}'
mode: '{{ item.mode | default(omit) }}'
owner: '{{ item.owner | default(omit) }}'
remote_src: '{{ item.remote_src | default(omit) }}'
selevel: '{{ item.selevel | default(omit) }}'
serole: '{{ item.serole | default(omit) }}'
setype: '{{ item.setype | default(omit) }}'
seuser: '{{ item.seuser | default(omit) }}'
src: '{{ item.src | default(omit) }}'
unsafe_writes: '{{ item.unsafe_writes | default(omit) }}'
validate: '{{ item.validate | default(omit) }}'
- name: Execute post-command
command: '{{ item.post_command }}'
when: item.post_command is defined
...