diff --git a/inventory.ini b/inventory.ini index cf8a143..26cdf75 100644 --- a/inventory.ini +++ b/inventory.ini @@ -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 diff --git a/roles/virt-common/tasks/main.yml b/roles/virt-common/tasks/main.yml index 780b722..a658bb7 100644 --- a/roles/virt-common/tasks/main.yml +++ b/roles/virt-common/tasks/main.yml @@ -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 }}" diff --git a/roles/virt-common/templates/motd.j2 b/roles/virt-common/templates/motd.j2 new file mode 100644 index 0000000..460276c --- /dev/null +++ b/roles/virt-common/templates/motd.j2 @@ -0,0 +1,9 @@ + + Welcome to {{ hostname }}! +=========================================================================== + - FQDN................: {{ fqdn }} + - LAN IPv4............: {{ ansible_host }} + - Internal IPv4.......: {{ internal_ipv4 }} + - Server type.........: {{ virt_type | upper }} +=========================================================================== +