Initial commit

This commit is contained in:
nd 2019-04-09 18:25:26 +02:00
commit 9641e5a2f7
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
3 changed files with 28 additions and 0 deletions

23
tasks/file.yml Normal file
View file

@ -0,0 +1,23 @@
- set_fact:
defaultfile:
group: root
owner: root
mode: "0700"
state: present
content: ~
template: ~
template_vars: {}
- set_fact:
file: "{{ defaultfile|combine(item.value|d({}), {'path': item.key} ) }}"
- name: create file/folder
when:
- not file.content
- not file.template
file:
path: "{{ file.path }}"
group: "{{ file.group }}"
owner: "{{ file.owner }}"
mode: "{{ file.mode }}"
state: "{{ file.state }}"