Add MOTD
This commit is contained in:
parent
650af7941c
commit
f59f1dc5cd
|
@ -19,8 +19,8 @@ sapt-labs-db01
|
|||
[proxy_shrd]
|
||||
sapt-labr-prx01
|
||||
|
||||
[monitor_shrd]
|
||||
sapt-labr-mon01
|
||||
# [monitor_shrd]
|
||||
# sapt-labr-mon01
|
||||
|
||||
[proxmox_infra]
|
||||
sapt-labx-pve01
|
||||
|
@ -40,7 +40,7 @@ db_stage
|
|||
|
||||
[shared:children]
|
||||
proxy_shrd
|
||||
monitor_shrd
|
||||
# monitor_shrd
|
||||
|
||||
[appservers:children]
|
||||
app_prod
|
||||
|
@ -57,8 +57,8 @@ db_stage
|
|||
[proxyservers:children]
|
||||
proxy_shrd
|
||||
|
||||
[monitorservers:children]
|
||||
monitor_shrd
|
||||
# [monitorservers:children]
|
||||
# monitor_shrd
|
||||
|
||||
[virtualservers:children]
|
||||
production
|
||||
|
|
|
@ -8,6 +8,13 @@
|
|||
owner: root
|
||||
mode: u=rw,g=r,o=r
|
||||
|
||||
- name: Copy MOTD file
|
||||
ansible.builtin.template:
|
||||
src: motd.j2
|
||||
dest: /etc/motd.d/10-ansible
|
||||
owner: root
|
||||
mode: u=rw,g=r,o=r
|
||||
|
||||
- name: Add users
|
||||
ansible.builtin.user:
|
||||
name: "{{ item.name }}"
|
||||
|
|
9
roles/virt-common/templates/motd.j2
Normal file
9
roles/virt-common/templates/motd.j2
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
Welcome to {{ hostname }}!
|
||||
===========================================================================
|
||||
- FQDN................: {{ fqdn }}
|
||||
- LAN IPv4............: {{ ansible_host }}
|
||||
- Internal IPv4.......: {{ internal_ipv4 }}
|
||||
- Server type.........: {{ virt_type | upper }}
|
||||
===========================================================================
|
||||
|
Loading…
Reference in a new issue