You've already forked ansible-linux-infra
initial commit
This commit is contained in:
5
roles/banners/handlers/main.yml
Normal file
5
roles/banners/handlers/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: restart sshd (banners)
|
||||
ansible.builtin.systemd:
|
||||
name: sshd
|
||||
state: restarted
|
||||
21
roles/banners/tasks/main.yml
Normal file
21
roles/banners/tasks/main.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: Deploy local console login banner
|
||||
ansible.builtin.template:
|
||||
src: issue.j2
|
||||
dest: /etc/issue
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
when: banner_enabled | bool
|
||||
tags: [banners]
|
||||
|
||||
- name: Deploy network (pre-auth SSH) login banner
|
||||
ansible.builtin.template:
|
||||
src: issue.net.j2
|
||||
dest: /etc/issue.net
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
when: banner_enabled | bool
|
||||
notify: restart sshd (banners)
|
||||
tags: [banners]
|
||||
5
roles/banners/templates/issue.j2
Normal file
5
roles/banners/templates/issue.j2
Normal file
@@ -0,0 +1,5 @@
|
||||
******************************************************************
|
||||
AUTHORIZED ACCESS ONLY.
|
||||
All activity on this system is logged and monitored.
|
||||
Unauthorized access is prohibited and may be prosecuted.
|
||||
******************************************************************
|
||||
5
roles/banners/templates/issue.net.j2
Normal file
5
roles/banners/templates/issue.net.j2
Normal file
@@ -0,0 +1,5 @@
|
||||
******************************************************************
|
||||
AUTHORIZED ACCESS ONLY.
|
||||
All activity on this system is logged and monitored.
|
||||
Unauthorized access is prohibited and may be prosecuted.
|
||||
******************************************************************
|
||||
Reference in New Issue
Block a user