From 5eefbc300211a27df37552d681590560efd2a6be Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Sun, 9 Feb 2025 17:26:59 +0100 Subject: [PATCH] added ssh banner for Soluzione Uno --- banner-soluzioneuno.yml | 9 +++++++++ tasks/general/banner-soluzioneuno.yml | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 banner-soluzioneuno.yml create mode 100644 tasks/general/banner-soluzioneuno.yml diff --git a/banner-soluzioneuno.yml b/banner-soluzioneuno.yml new file mode 100644 index 0000000..d4c29ed --- /dev/null +++ b/banner-soluzioneuno.yml @@ -0,0 +1,9 @@ +--- +- 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" diff --git a/tasks/general/banner-soluzioneuno.yml b/tasks/general/banner-soluzioneuno.yml new file mode 100644 index 0000000..d27a10c --- /dev/null +++ b/tasks/general/banner-soluzioneuno.yml @@ -0,0 +1,23 @@ +--- +- name: Ensure /etc/banner is populated with Soluzione Uno + ansible.builtin.copy: + dest: /etc/banner + content: | +┌──────────────────────────────────────────────────────┐ +│ ___ _ _ _ _ │ +│ / __| ___| |_ _ __(_)___ _ _ ___ | | | |_ _ ___ │ +│ \__ \/ _ \ | || |_ / / _ \ ' \/ -_) | |_| | ' \/ _ \ │ +│ |___/\___/_|\_,_/__|_\___/_||_\___| \___/|_||_\___/ │ +│ │ +│ This system is hosted and managed by Soluzione Uno. │ +│ Any attempted or successful access is hereby │ +│ prohibited, unless holding a written authorization. │ +│ │ +│ According to current regulations and to the fullest │ +│ extent permitted by law, the above specified will be │ +│ criminally prosecuted before a judge. │ +│ Unless willing to risk jail and fines, you are to │ +│ leave this system immediately without any further │ +│ action on your part. You have been warned. │ +│ │ +└──────────────────────────────────────────────────────┘