{"id":502,"date":"2018-03-13T16:09:36","date_gmt":"2018-03-13T16:09:36","guid":{"rendered":"http:\/\/shijuvarghese.com\/?p=502"},"modified":"2024-02-23T06:04:54","modified_gmt":"2024-02-23T06:04:54","slug":"ansible-introduction-installation-and-configuration","status":"publish","type":"post","link":"http:\/\/shijuvarghese.com\/?p=502","title":{"rendered":"Ansible : Introduction, installation and configuration"},"content":{"rendered":"<p>Ansible is an opensource automation tool used for Configuration Management. It is used for Application Deployment and server provisioning. It works on an agent less architecture on client nodes.<\/p>\n<p>It used a simple language called Yaml for Ansible Playbooks, used to describe the automation job.<\/p>\n<p><strong>Installing Ansible<\/strong><\/p>\n<ul>\n<li><em><strong>yum install ansible -y<\/strong><\/em><\/li>\n<\/ul>\n<p><strong>Configuring Ansible<\/strong><\/p>\n<ul>\n<li>The Inventory file, a simple ini file that consists the details of the hosts to whcih Ansible pushes the configurations is listed by default in:\u00a0 &#8220;<strong>\/etc\/ansible\/hosts<\/strong>&#8220;.<\/li>\n<li>To add a node, enter its IP address at the end of the file. As you get comfortable you may explore the contents of this file and add the node in the appropriate section.<\/li>\n<li>From this server system ssh to the client node to ensure the ssh connections gets established without any issue.<\/li>\n<li>Run the command &#8220;<em><strong>ansible all -m ping &#8211;ask-pass<\/strong><\/em>&#8221; to verify if Ansible host can communicate with the nodes mentioned in the Inventory file. If all goes well, the result will be as follows:<\/li>\n<\/ul>\n<p>[root@gw16-lap-devops ~]# ansible all -m ping &#8211;ask-pass<br \/>\nSSH password:<br \/>\nhost1 | SUCCESS =&gt; {<br \/>\n&#8220;changed&#8221;: false,<br \/>\n&#8220;ping&#8221;: &#8220;pong&#8221;<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<p>Click <a href=\"http:\/\/shijuvarghese.com\/?p=507\">here <\/a>for additional documents to deploy appache, php, mysql, create databases and tables, and to copy files.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Ansible is an opensource automation tool used for Configuration Management. It is used for Application Deployment and server provisioning. It works on an agent less <a class=\"mh-excerpt-more\" href=\"http:\/\/shijuvarghese.com\/?p=502\" title=\"Ansible : Introduction, installation and configuration\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,15,21,3],"tags":[],"class_list":["post-502","post","type-post","status-publish","format-standard","hentry","category-ansible","category-configuration-management","category-devops","category-linux"],"_links":{"self":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=502"}],"version-history":[{"count":3,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/502\/revisions"}],"predecessor-version":[{"id":513,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/502\/revisions\/513"}],"wp:attachment":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=502"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}