Ansible – Ansible Roles (Part-9)
What is an Ansible Role? An Ansible role is a way to group multiple tasks, variables, handlers, files, templates, and other resources into a reusable and structured format. Roles provide…
What is an Ansible Role? An Ansible role is a way to group multiple tasks, variables, handlers, files, templates, and other resources into a reusable and structured format. Roles provide…
We can declare variables in Which can be used & Intropolate only in playbook Tasks but not in the files used in playbook. Solution: TemplateUsing Template module you can Interpolate…
Looping in Ansible allows you to repeat a task multiple times with different inputs. This feature is particularly useful for managing lists of items, such as packages to install, users…
Ansible conditioning, also known as conditional statements, allows you to execute tasks in a playbook based on specific conditions. This feature makes your playbooks more dynamic and adaptable to different…
Variables (Vars) Variables are an essential part of Ansible playbooks, allowing you to make your playbooks more flexible and reusable. Types of Variables: Variables in Playbook: Variables in a Vars…
An Ansible playbook is a YAML file that defines a set of tasks to be executed on a group of hosts. Playbooks are designed to be human-readable and allow you…
Install Package in Local host using using adhoc command Using ad-hoc Ansible commands Install Apache using apt module: official – https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html Copy index.html using copy module: official – https://docs.ansible.com/ansible/latest/collections/ansible/builtin/copy_module.html Start…
Ansible Installation and Configuration Guide How to install ansible in Ubuntu? How to install ansible in Centos 7 / RHEL 7? How to install ansible in Centos 8 / RHEL…
Components of Ansible 1. Executables Description: Key Executables: This command pings all hosts in the inventory to check connectivity. ansible-playbook: Used to run playbooks, which are YAML files containing a…
What is Ansible? Ansible is an open-source automation tool used for configuration management, application deployment, and task automation. It simplifies complex tasks and makes it easier to manage a large…
1. Github Description: 2. Org (Organization) Description: Example: 3. Team Description: Example: 4. Auth (Authentication) Description: Examples: OAuth Authentication: Personal Access Tokens: SSH Key Authentication: 5. Action == CI (Continuous…
Git Log Explanation Explanation of Each Part 1. Commit Hash 2. References (Branches and Tags) 3. Commit Message Simplified Breakdown of Each Line Summary The git log –oneline command provides…
Merge and Pull in Git Merge Merge is a command used to combine the changes from one branch into another. It is typically used to integrate changes from a feature…
Local and Remote Branches in Git Local Branch A local branch is a branch that exists in your local Git repository. You create and manage local branches on your machine,…
Undoing changes in Git can be approached in several ways, depending on what you need to achieve. Here, we’ll cover the most common scenarios and commands for undoing changes in…
Understanding Git Concepts 1. Git Branching and Merging Branching allows you to create a separate line of development. It’s useful for working on different features or fixes independently. Merging is…
Git and GitHub: Step-by-Step Guide Let’s explore how to interact with Git and GitHub, focusing on pushing, pulling, and cloning files between your local machine and GitHub. 1. Setting Up…
Pushing Existing Code to GitHub using HTTPS Prerequisites: Run below command It will ask for personal token to connect to github Create personal token from github Go to profile –>…
What is GitHub? GitHub is a web-based platform that uses Git for version control and offers features to facilitate collaboration on software development projects. It hosts your Git repositories and…
1. Switching Branches Scenario: You have multiple branches in your repository, and you want to switch from the current branch to another branch. Example: Switch to feature-branch: 2. Creating and…