Fix risky-file-permissions because of unpecified mode
This commit is contained in:
parent
f788767839
commit
adde811f47
@ -4,6 +4,7 @@
|
||||
- name: Disable Kernel Modules
|
||||
ansible.builtin.copy:
|
||||
dest: /mnt/etc/modprobe.d/cis.conf
|
||||
mode: '0644'
|
||||
content: |
|
||||
CIS LVL 3 Restrictions
|
||||
install freevxfs /bin/true
|
||||
@ -22,6 +23,7 @@
|
||||
- name: Create USB Rules
|
||||
ansible.builtin.copy:
|
||||
dest: /mnt/etc/udev/rules.d/10-cis_usb_devices.sh
|
||||
mode: '0644'
|
||||
content: |
|
||||
By default, disable all.
|
||||
ACTION=="add", SUBSYSTEMS=="usb", TEST=="authorized_default", ATTR{authorized_default}="0"
|
||||
@ -38,6 +40,7 @@
|
||||
- name: Create a consolidated sysctl configuration file
|
||||
ansible.builtin.copy:
|
||||
dest: /mnt/etc/sysctl.d/10-cis.conf
|
||||
mode: '0644'
|
||||
content: |
|
||||
## CIS Sysctl configurations
|
||||
net.ipv4.conf.all.log_martians = 1
|
||||
|
@ -39,6 +39,7 @@
|
||||
ansible.builtin.copy:
|
||||
content: "{{ hostname }}"
|
||||
dest: /mnt/etc/hostname
|
||||
mode: '0644'
|
||||
|
||||
- name: Add host entry to /etc/hosts
|
||||
ansible.builtin.lineinfile:
|
||||
@ -48,13 +49,15 @@
|
||||
|
||||
- name: Create vconsole.conf
|
||||
ansible.builtin.copy:
|
||||
content: KEYMAP=us-intl
|
||||
content: KEYMAP=us
|
||||
dest: /mnt/etc/vconsole.conf
|
||||
mode: '0644'
|
||||
|
||||
- name: Create locale.conf
|
||||
ansible.builtin.copy:
|
||||
content: LANG=en_US.UTF-8
|
||||
dest: /mnt/etc/locale.conf
|
||||
mode: '0644'
|
||||
|
||||
- name: SSH permit Password
|
||||
ansible.builtin.replace:
|
||||
@ -131,6 +134,7 @@
|
||||
ansible.builtin.template:
|
||||
src: custom.sh.j2
|
||||
dest: /mnt/etc/profile.d/custom.sh
|
||||
mode: '0644'
|
||||
|
||||
- name: Setup Network
|
||||
block:
|
||||
|
@ -66,8 +66,10 @@
|
||||
ansible.builtin.file:
|
||||
path: /etc/yum.repos.d
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Create RHEL repository file
|
||||
ansible.builtin.template:
|
||||
src: "{{ os | lower }}.repo.j2"
|
||||
dest: /etc/yum.repos.d/{{ os | lower }}.repo
|
||||
mode: '0644'
|
||||
|
@ -21,6 +21,7 @@
|
||||
ansible.builtin.template:
|
||||
src: "{{ item.src }}"
|
||||
dest: /tmp/{{ item.dest_prefix }}-{{ hostname }}.yml
|
||||
mode: '0644'
|
||||
loop:
|
||||
- { src: cloud-user-data.yml.j2, dest_prefix: cloud-user-data }
|
||||
- { src: cloud-network-config.yml.j2, dest_prefix: cloud-network-config }
|
||||
|
Loading…
Reference in New Issue
Block a user