Adding a server which isn't api managed simply

14 views
Skip to first unread message

Erik-jan Riemers

unread,
Mar 1, 2015, 9:09:57 AM3/1/15
to ansible...@googlegroups.com
Just wanted to share, i'am new to the whole Ansible but i did feel i still had to do work on initial servers (unlike amazon and the likes which can be automated more) so i made a simple function to do a addserver. I started out simple as a one lines but then i made some simple checks in it so others could use it too.

Basicly just a "addserver <ip>" and it will at least place the keys and add a sudoers entry on the remote host (regardless if it has a entry in the known_hosts) assuming you use root to login remotely. After that, yes you run the playbook to harden the box and remove remote login with root etc etc.


Feel free to give remarks, as i didn't find a "this does it" on google.. :)

Erik
Reply all
Reply to author
Forward
0 new messages