rearranged ssh banner files

This commit is contained in:
2026-04-07 12:37:53 +02:00
parent 00762619c6
commit 5e4c4d198b
6 changed files with 13 additions and 18 deletions

View File

@@ -1,9 +0,0 @@
---
- hosts: all
become: true
tasks:
- import_tasks: tasks/general/banner-soluzioneuno.yml
- import_tasks: tasks/debian-general/sshbanner.yml
when: ansible_facts["os_family"] == "Debian"
- import_tasks: tasks/rhel-general/sshbanner.yml
when: ansible_facts["os_family"] == "RedHat"

View File

@@ -3,7 +3,8 @@
become: true
tasks:
- import_tasks: tasks/general/sshbanner-bjphoster.yml
- import_tasks: tasks/debian-general/sshbanner.yml
- import_tasks: tasks/general/sshbanner.yml
- import_tasks: tasks/debian-general/restart-ssh-service.yml
when: ansible_facts["distribution"] == "Debian"
- import_tasks: tasks/rhel-general/sshbanner.yml
- import_tasks: tasks/rhel-general/restart-ssh-service.yml
when: ansible_facts["distribution"] == "RedHat"

View File

@@ -0,0 +1,10 @@
---
- hosts: all
become: true
tasks:
- import_tasks: tasks/general/sshbanner-soluzioneuno.yml
- import_tasks: tasks/general/sshbanner.yml
- import_tasks: tasks/debian-general/restart-ssh-service.yml
when: ansible_facts["distribution"] == "Debian"
- import_tasks: tasks/rhel-general/restart-ssh-service.yml
when: ansible_facts["distribution"] == "RedHat"

View File

@@ -1,7 +0,0 @@
---
- name: (rhel) Ensure SSH banner is uncommented and right path in /etc/ssh/sshd_config
ansible.builtin.lineinfile:
line: "Banner /etc/banner"
path: /etc/ssh/sshd_config
regexp: '^#\s*Banner.*$'
- import_tasks: restart-ssh-service.yml