Lab 2 - Ansible Configuration & Inventory """"""""""""""""""""""""""""""""""""""""" Mandatory ========= Create the Ansible Configuration -------------------------------- * Connect to your ``srv..lab`` as ``ansible`` user * Switch into your git repo ``/home/ansible/training`` * Create a ``ansible.cfg`` file and configure * inventory path to ``hosts`` * enable ``become`` Create a static inventory ------------------------- * Create a ``hosts`` file * add all your servers to the inventory file * web1..lab * web2..lab * db..lab .. important:: Don't add ``srv.firstname.lab`` in your inventory. Run some Ansible commands ------------------------- * Run ``uname`` on all servers * Run ``whoami`` on all servers Commit your changes ------------------- * add all files to your git repo and commit it Optional ======== Run whoami as ansible user -------------------------- .. hint:: Checkout http://docs.ansible.com/ansible/intro_adhoc.html Try out ansible-doc ------------------- * print out all available modules * have a look at the ``ping`` module Checkout the available modules ------------------------------ * http://docs.ansible.com/ansible/list_of_all_modules.html