Skip to content

Sifungurux/ansible-hostname-aschii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-hostname-aschii

Transscript Hostname into banner teskt into motd

Using this role: Add to play

roles:

  • ansible-hostname-aschii

There are three varibles that can be set

  • env - for environemnt (testing, develop, Pre-prod and Prod
  • warn - a Warning messages
  • note - What does this server do eg. This is a Jenkins/Travis server

Using the Vagrantfile to test, this is the inventory file generated

# Generated by Vagrant

figlet_cen ansible_host=192.168.121.19 ansible_port=22 ansible_user='vagrant' ansible_ssh_private_key_file='/home/sifungurux/Projekts/ansible-hostname-aschii/tests/.vagrant/machines/figlet_cen/libvirt/private_key' note='This is s figlet server running CentOS'

[PRODUCTION]
figlet_cen

[PRODUCTION:vars]
env=PRE-PRODUCTION
warn=This is a pre-prod server - Think about what you are doing and BE CAREFULL

Result

➜ vagrant ssh
Last login: Sat Mar  3 20:01:03 2018 from 192.168.121.1
                             __ _       _      _         ____           _            
                            / _(_) __ _| | ___| |_      / ___|___ _ __ | |_ ___  ___ 
                           | |_| |/ _` | |/ _ \ __|____| |   / _ \ '_ \| __/ _ \/ __|
                           |  _| | (_| | |  __/ ||_____| |__|  __/ | | | || (_) \__ \
                           |_| |_|\__, |_|\___|\__|     \____\___|_| |_|\__\___/|___/
                                  |___/                                              

################################################################################################################

         PRE-PRODUCTION - This is a pre-prod server - Think about what you are doing and BE CAREFULL

################################################################################################################

Remember the size of the warn. It can mess of the dynamic motd. Is not vertical flexible.

About

Transscript Hostname into banner teskt into motd

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published