This is weird and I am not sure of what really caused it all I know is I just wanted to start making motd files bit more useful. Created this simple playbook
---
- hosts: web
user: root
tasks:
- name: Ensure the MOTD file is present and updated
template:
src: motd
dest: /etc/motd
owner: root
group: root
mode: 0644
- name: Ensure the hostname is the same of the inventory
hostname:
name: "{{ inventory_hostname }}"
using this template
This system is managed by Ansible
Any change done on this system could be overwritten by Ansible
OS: {{ ansible_distribution }} {{ ansible_distribution_version }}
Hostname: {{ inventory_hostname }}
Main Ip address: {{ ansible_default_ipv4.address }}
All connections are monitored and recorded
Disconnect IMMEDIATELY if you are not an authorized user
I ran this on 2 servers. The login prompt changed for example to this [root@10 ~]#
ansible --version
ansible 2.2.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
I have checked ~/.bashrc /etc/bashrc /etc/profile i see nothing that would have changed the prompt.