new files from source
This commit is contained in:
132 files changed
+5335
No files matched your search
@@ -0,0 +1,16 @@
|
||||
---
|
||||
# Default ownership and permissions for critical files and directories
|
||||
|
||||
file_permissions_list:
|
||||
- { path: "/root", mode: "0700", state: "directory" }
|
||||
- { path: "/etc/passwd", mode: "0644", state: "file" }
|
||||
- { path: "/etc/shadow", mode: "0400", state: "file" }
|
||||
- { path: "/etc/group", mode: "0644", state: "file" }
|
||||
- { path: "/etc/gshadow", mode: "0400", state: "file" }
|
||||
- { path: "/etc/crontab", mode: "0600", state: "file" }
|
||||
- { path: "/etc/cron.hourly", mode: "0700", state: "directory" }
|
||||
- { path: "/etc/cron.daily", mode: "0700", state: "directory" }
|
||||
- { path: "/etc/cron.weekly", mode: "0700", state: "directory" }
|
||||
- { path: "/etc/cron.monthly", mode: "0700", state: "directory" }
|
||||
- { path: "/etc/cron.d", mode: "0700", state: "directory" }
|
||||
- { path: "/etc/rsyslog.conf", mode: "0640", state: "file" }
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Ensure system files and directories have correct ownership and permissions
|
||||
ansible.builtin.file:
|
||||
path: "{{ file_item.path }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "{{ file_item.mode }}"
|
||||
state: "{{ file_item.state }}"
|
||||
loop: "{{ file_permissions_list }}"
|
||||
loop_control:
|
||||
loop_var: file_item
|
||||
Reference in new issue
Block a user