Add MOTD
This commit is contained in:
parent
650af7941c
commit
f59f1dc5cd
|
@ -19,8 +19,8 @@ sapt-labs-db01
|
||||||
[proxy_shrd]
|
[proxy_shrd]
|
||||||
sapt-labr-prx01
|
sapt-labr-prx01
|
||||||
|
|
||||||
[monitor_shrd]
|
# [monitor_shrd]
|
||||||
sapt-labr-mon01
|
# sapt-labr-mon01
|
||||||
|
|
||||||
[proxmox_infra]
|
[proxmox_infra]
|
||||||
sapt-labx-pve01
|
sapt-labx-pve01
|
||||||
|
@ -40,7 +40,7 @@ db_stage
|
||||||
|
|
||||||
[shared:children]
|
[shared:children]
|
||||||
proxy_shrd
|
proxy_shrd
|
||||||
monitor_shrd
|
# monitor_shrd
|
||||||
|
|
||||||
[appservers:children]
|
[appservers:children]
|
||||||
app_prod
|
app_prod
|
||||||
|
@ -57,8 +57,8 @@ db_stage
|
||||||
[proxyservers:children]
|
[proxyservers:children]
|
||||||
proxy_shrd
|
proxy_shrd
|
||||||
|
|
||||||
[monitorservers:children]
|
# [monitorservers:children]
|
||||||
monitor_shrd
|
# monitor_shrd
|
||||||
|
|
||||||
[virtualservers:children]
|
[virtualservers:children]
|
||||||
production
|
production
|
||||||
|
|
|
@ -8,6 +8,13 @@
|
||||||
owner: root
|
owner: root
|
||||||
mode: u=rw,g=r,o=r
|
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
|
- name: Add users
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: "{{ item.name }}"
|
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