<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ansible on Sagar Panda | DevOps &amp; Cloud Infra Engineer</title><link>https://new.sagarpanda.com/tags/ansible/</link><description>Recent content in Ansible on Sagar Panda | DevOps &amp; Cloud Infra Engineer</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 18 Jun 2023 19:26:10 +0530</lastBuildDate><atom:link href="https://new.sagarpanda.com/tags/ansible/index.xml" rel="self" type="application/rss+xml"/><item><title>Ansible — Error Handling, Roles and Valult</title><link>https://new.sagarpanda.com/blogs/ansible/ansible3/</link><pubDate>Sun, 18 Jun 2023 19:26:10 +0530</pubDate><guid>https://new.sagarpanda.com/blogs/ansible/ansible3/</guid><description>&lt;p&gt;In the earlier posts, we saw how to &lt;a
 href="https://new.sagarpanda.com/blogs/ansible/ansible1/"&gt;&lt;strong&gt;&lt;em&gt;Setup Ansible&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;, &lt;a
 href="https://new.sagarpanda.com/blogs/ansible/ansible2/"&gt;&lt;strong&gt;&lt;em&gt;simple playbooks with groups, variables, conditionals and loop&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this article we’ll discuss about using Notify Handler, Roles, Error Handling and Vault in Ansible.&lt;/p&gt;
&lt;h2 id="notify-and-handler"&gt;Notify and Handler&lt;a href="#notify-and-handler" class="heading-anchor" aria-label="Link to this section"&gt;&lt;svg class="h-4 w-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"&gt;&lt;path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/&gt;&lt;path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Handler is a special task that executes when called by &lt;code&gt;notify&lt;/code&gt;keyword. The &lt;code&gt;notify&lt;/code&gt; keyword is applied to a task and accepts a list of handler names that are notified on a task change.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, when we are operating on any webserver, instead of restarting the service every time we can specify the time when its required using notify and handler.&lt;/p&gt;</description></item><item><title>Ansible - Groups, Vars and Loop</title><link>https://new.sagarpanda.com/blogs/ansible/ansible2/</link><pubDate>Mon, 29 May 2023 19:26:10 +0530</pubDate><guid>https://new.sagarpanda.com/blogs/ansible/ansible2/</guid><description>&lt;p&gt;In the &lt;a
 href="https://new.sagarpanda.com/blogs/ansible/ansible1/"&gt;&lt;strong&gt;&lt;em&gt;previous article&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;, we saw how to install Ansible, ping a server and a simple playbook.&lt;/p&gt;
&lt;p&gt;In this article we’ll discuss about using groups , use of variables and loops in a playbook.&lt;/p&gt;
&lt;p&gt;This setup includes 3 machines. The controller node is a local machine where the managed nodes are two ec2 instances.&lt;/p&gt;
&lt;h2 id="inventory-groups"&gt;Inventory Groups&lt;a href="#inventory-groups" class="heading-anchor" aria-label="Link to this section"&gt;&lt;svg class="h-4 w-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"&gt;&lt;path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/&gt;&lt;path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ansible allows you to organize hosts into groups within the inventory file. Grouping hosts enables you to target specific subsets of hosts and apply different configurations or tasks based on their roles or characteristics.&lt;/p&gt;</description></item><item><title>Getting started with Ansible - Configuration Managament</title><link>https://new.sagarpanda.com/blogs/ansible/ansible1/</link><pubDate>Sun, 21 May 2023 19:26:10 +0530</pubDate><guid>https://new.sagarpanda.com/blogs/ansible/ansible1/</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;a href="#introduction" class="heading-anchor" aria-label="Link to this section"&gt;&lt;svg class="h-4 w-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"&gt;&lt;path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/&gt;&lt;path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Ansible is an open source configuration management utility. It can automate and standardize the configuration of remote hosts and virtual machines. We can perform application installation, system update and many such operations.&lt;/p&gt;
&lt;h3 id="why-use-ansible"&gt;Why use Ansible:&lt;a href="#why-use-ansible" class="heading-anchor" aria-label="Link to this section"&gt;&lt;svg class="h-4 w-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"&gt;&lt;path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/&gt;&lt;path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Ansible is very handy when it comes to installation of software on large numbers of machines. But why ansible when we can use Chef or Puppet.&lt;/p&gt;</description></item></channel></rss>