14 lines
467 B
YAML
14 lines
467 B
YAML
- 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'
|
|
|
|
- name: Create and copy hardening files
|
|
ansible.builtin.template:
|
|
src: '{{ item.src }}'
|
|
dest: '/etc/{{ item.path }}'
|
|
with_community.general.filetree: '../templates/systemd/etc/'
|
|
when: item.state == 'file'
|