fix missing directory structure creation before file copy for hardening-basic
This commit is contained in:
parent
8905c9cb02
commit
af7de5fbbc
1 changed files with 16 additions and 0 deletions
|
@ -3,6 +3,14 @@
|
||||||
|
|
||||||
- name: Basic Hardening
|
- name: Basic Hardening
|
||||||
block:
|
block:
|
||||||
|
- name: Create directory structure
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: '/etc/{{ item.path }}'
|
||||||
|
state: directory
|
||||||
|
mode: '{{ item.mode }}'
|
||||||
|
with_community.general.filetree: '../templates/basic/etc/'
|
||||||
|
when: item.state == 'directory'
|
||||||
|
|
||||||
- name: Create and copy hardening files
|
- name: Create and copy hardening files
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: '{{ item.src }}'
|
src: '{{ item.src }}'
|
||||||
|
@ -13,6 +21,14 @@
|
||||||
- name: Harden SSH Config
|
- name: Harden SSH Config
|
||||||
when: 'hardening_sshd_enabled is true'
|
when: 'hardening_sshd_enabled is true'
|
||||||
block:
|
block:
|
||||||
|
- name: Create directory structure
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: '/etc/{{ item.path }}'
|
||||||
|
state: directory
|
||||||
|
mode: '{{ item.mode }}'
|
||||||
|
with_community.general.filetree: '../templates/ssh/etc/'
|
||||||
|
when: item.state == 'directory'
|
||||||
|
|
||||||
- name: Create and copy hardening files
|
- name: Create and copy hardening files
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: '{{ item.src }}'
|
src: '{{ item.src }}'
|
||||||
|
|
Loading…
Reference in a new issue