refactor(configuration): relocate login banner and fix blockinfile markers

This commit is contained in:
2026-02-20 20:16:19 +01:00
parent cf68a93b45
commit fba2e5fc94
2 changed files with 18 additions and 26 deletions

View File

@@ -23,6 +23,22 @@
- /mnt/etc/motd.d/insights-client
failed_when: false
- name: Create login banner
ansible.builtin.copy:
dest: "{{ item }}"
content: |
**************************************************************
* WARNING: Unauthorized access to this system is prohibited. *
* All activities are monitored and logged. *
* Disconnect immediately if you are not an authorized user. *
**************************************************************
owner: root
group: root
mode: "0644"
loop:
- /mnt/etc/issue
- /mnt/etc/issue.net
- name: Configure sudo banner
when: system_cfg.features.banner.sudo | bool
block: