2022-11-22 11:42:08 +01:00
|
|
|
- name: Create directory tree if not exists
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: '/etc/{{ item.path }}'
|
|
|
|
state: directory
|
|
|
|
mode: '{{ item.mode }}'
|
|
|
|
with_community.general.filetree: '../templates/systemd/etc/'
|
|
|
|
when: item.state == 'directory'
|
|
|
|
|
2022-11-22 15:04:17 +01:00
|
|
|
- name: Create and copy files
|
2022-11-22 11:42:08 +01:00
|
|
|
ansible.builtin.template:
|
|
|
|
src: '{{ item.src }}'
|
|
|
|
dest: '/etc/{{ item.path }}'
|
|
|
|
with_community.general.filetree: '../templates/systemd/etc/'
|
|
|
|
when: item.state == 'file'
|