+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ In this module we will be talking about ansible module called "setup" which is used to gather information about modules, The file module for a variety of different file based operations. We will look at the color notation used at the ansible execution . And how it relates to the key feature of Ansible called "Idempotency" We will be using the We will be using the copy module and the command module, Ansible.doc to quickly understand the options available while using ansible modules . Used for gathering facts about playbooks. $ ansible centos1 -m setup $ ansible centos1 -m setup | more We can see information about devices . loads of information that get gathered here as facts , Using the file module using the combination of paths and states , path to the file being managed...
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Here we will validate Ansible to check if it is working as expected . If you are using Ubuntu-c or configured your own Ansible controller machine . You should have an ansible folder, within this you should have a subdirectory venv27. if so activate your virtual environment. $ source venv27/bin/activate If you decide to go by an alternative approach such as installing ansible using a system package Please create an ansible directory now , you can continue with out the virtual environment In the installation video we used the ansible command , check the installation was working as expected. We are going to use the same ansible command to validate our system But this time we are going to work on a remote system . We are going to make use of an ansible configuration and an inventory file. Before we d...
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Ansible Architecture and Design Ansible Inventory How can we provide connectivity to our Ansible hosts via root There is a directory for each of these sections As you can see there is a directory for each of these sections essentially we can move to each directory and run ansible from each directory . Currently our setup is quite simple we are connected as pact user connect to controller machine and using ansible as pack user connected to the end points. We are going to configure Ansible so that we can have *root* connectivity for all of our end points. The centos systems are pretty simpler . we have "ansible_user" variable set for centos hosts stating the user we will use for connectivity is root. $ ansible all -m ping the variable ansible_user hosts fails as we havent s...
Comments
Post a Comment