Bulbasaur I choose you

Eran Goldman-Malka · February 5, 2019

After building an ansible script to start backend servers, I had to choose names for those servers so the servers are named alphabetically on pokemons.

So it’s just the next level to call ssh with the ‘command :’ ‘Bulbasaur I choose you’, and not just simple ‘ssh ‘bulbasaur’’

The first thing is to define that I can connect to the server without password or any interruption.
That was done with simple key exchange, there are tons of guides for that so just google or use the DO one.

The second thing is to use the wrong command format to create ‘a right’ ssh call.

I decided to use the most simple method for time saving … Aliases …

I created an ~/.bash_aliases file with the next commands :

alias i=''
alias choose=''
alias you=''
alias bulbasaur='ssh bulbasaur.domain ;'

And I added to ansible script that after every creation of a pokemon it’ll add the alias to the bash_aliases file

Twitter, Facebook