Task 11.2 which companies are getting benifited by the giant technologies
?? History of Ansible :
The term “ansible” was coined by Ursula K. Le Guin in her 1966 novel Rocannon’s World, and refers to fictional instantaneous communication systems.
The Ansible tool was developed by Michael DeHaan, the author of the provisioning server application Cobbler and co-author of the Fedora Unified Network Controller (Func) framework for remote administration. Ansible, Inc. (originally AnsibleWorks, Inc.) was the company set up to commercially support and sponsor Ansible.
?? Written in :
Python
PowerShell
Shell
Ruby
? operating system in:
Linux,
Unix-like
MacOS
Windows
??What is Ansible??
Ansible is an open-source software provisioning, configuration management, and application-deployment tool enabling infrastructure as code. It runs on many Unix-like systems, and can configure both Unix-like systems as well as Microsoft Windows.
It is a simple automation language that can perfectly describe an IT application infrastructure in Ansible Playbooks. It is also an automation engine that runs Ansible Playbooks.
Ansible can manage powerful automation tasks and can adapt to many different workflows and environments.
??Ansible is Simple and better understanding :
Human readable automation
No special coding skills needed
minimize time complexity
Get productive quickly
easy to simple understanding
Tasks executed in order
minimum time program execute
? Powerful
App deployment
Configuration management
Workflow orchestration
Orchestrate the app lifecycle
??Agentless
Agentless architecture
Uses OpenSSH and WinRM
No agents to exploit or update
Predictable, reliable and secure
??How Ansible works??
In Ansible, there are two categories of computers: the control node and managed nodes. The control node is a computer that runs Ansible. There must be at least one control node, although a backup control node may also exist. A managed node is any device being managed by the control node.
Ansible works by connecting to nodes (clients, servers, or whatever you’re configuring) on a network, and then sending a small program called an Ansible module to that node. Ansible executes these modules over SSH and removes them when finished. The only requirement for this interaction is that your Ansible control node has login access to the managed nodes. SSH keys are the most common way to provide access, but other forms of authentication are also supported.
??Ansible playbooks
While modules provide the means of accomplishing a task, the way you use them is through an Ansible playbook. A playbook is a configuration file written in YAML that provides instructions for what needs to be done in order to bring a managed node into the desired state.
Playbooks are meant to be simple, human-readable, and self-documenting. They are also idempotent, meaning that a playbook can be run on a system at any time without having a negative effect upon it. If a playbook is run on a system that’s already properly configured and in its desired state, then that system should still be properly configured after a playbook runs.
Playbooks can also be very complex, with conditionals and variables. However, because most of the real work is done by Ansible modules, playbooks remain brief, readable, and clear even though they can orchestrate entire networks of managed nodes.
??Working With Modules
Ansible ships with a number of modules (called the ‘module library’) that can be executed directly on remote hosts or through Playbooks.
Users can also write their own modules. These modules can control system resources, like services, packages, or files (anything really), or handle executing system commands.
??Inventory :
Ansible inventory file defines the hosts and groups of hosts upon which commands, modules, and tasks in a playbook operate. The file can be in one of many formats depending on your Ansible environment and plugins.. If necessary, you can also create project-specific inventory files in alternate locations.
?? What are use cases of Ansible?
Complete IT automation
??PROVISIONING :
Your apps have to live somewhere. If you’re PXE booting and kickstarting bare-metal servers or VMs, or creating virtual or cloud instances from templates, Ansible and Red Hat? Ansible? Tower help streamline the process.
??CONFIGURATION MANAGEMENT:
Centralizing configuration file management and deployment is a common use case for Ansible, and it’s how many power users are first introduced to the Ansible automation platform.
??APPLICATION DEPLOYMENT :
When you define your application with Ansible, and manage the deployment with Ansible Tower, teams are able to effectively manage the entire application lifecycle from development to production.
??CONTINUOUS DELIVERY :
Creating a CI/CD pipeline requires buy-in from numerous teams. You can’t do it without a simple automation platform that everyone in your organization can use. Ansible Playbooks keep your applications properly deployed (and managed) throughout their entire lifecycle.
??SECURITY AUTOMATION :
When you define your security policy in Ansible, scanning and remediation of site-wide security policy can be integrated into other automated processes and instead of being an afterthought, it’ll be integral in everything that is deployed.
??ORCHESTRATION :
Configurations alone don’t define your environment. You need to define how multiple configurations interact and ensure the disparate pieces can be managed as a whole. Out of complexity and chaos, Ansible brings order.
??Featured Integrations:
Ansible includes hundreds of modules to support a wide variety of IT integrations, including:
?? Ansible components
Inventory. The “inventory” is a configuration file where you define the host information.
Playbooks. In most cases – especially in enterprise environments – you should use Ansible playbooks.
Plays. Playbooks contain plays.
?Tasks.
? Roles.
? Handlers.
?Templates.
? Variables.
??What is Ansible in DevOps?
Ansible is an open source IT Configuration Management, Deployment & Orchestration tool. It aims to provide large productivity gains to a wide variety of automation challenges. This tool is very simple to use yet powerful enough to automate complex multi-tier IT application environments. Ansible in DevOps
??Ansible Architecture
Ansible is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs.
Being designed for multi-tier deployments since day one, Ansible models your IT infrastructure by describing how all of your systems inter-relate, rather than just managing one system at a time.
It uses no agents and no additional custom security infrastructure, so it’s easy to deploy - and most importantly, it uses a very simple language (YAML, in the form of Ansible Playbooks) that allow you to describe your automation jobs in a way that approaches plain English.
In this section, we’ll give you a really quick overview of how Ansible works so you can see how the pieces fit together.
????configuration management
Ansible is a modern configuration management tool that facilitates the task of setting up and maintaining remote servers, with a minimalist design intended to get users up and running quickly. ... Ansible doesn't require any special software to be installed on the nodes that will be managed with this tool
??Basic Ansible Commands:
Verify connectivity of host: # ansible <group> -m -ping
Rebooting host systems: #ansible <group> -a “/sbin/reboot”
Creating a new user: # ansible <group> -m user -a “name=ansible password=<encrypted password>”
User Deletion: # ansible <group> -m user -a “name=ansible state=absent”
Permissions changing: # ansible <group> -m file -a “dest=/home/ansible/file1.txt mode=777”
Verify package installation with update: # ansible <group> -m yum -a “name=httpd state=latest”
Verify package installation without an update: # ansible <group> -m yum -a “name= httpd state=present”
Verify package version: # ansible <group> -m yum -a “name= httpd-1.8 state=present”
Verify package installation: # ansible <group> -m yum -a “name= httpd state=absent”
Display host information: # ansible <group> -m setup | less
????Examples of Ansible Service Module:
1. Start a Service
2.Stop a Service
3. Restart Service
4.Start and Enable Service
5.Working on Multiple Services in Single Playbook
6. Working Differently on Different Servers
7.Capturing the Output & Display
????How to Connect AWS to Ansible
Step 1: Creating an AWS Account.
Step 2: Launching an AWS Instance.
Step 3: Connect Instance with SSH.
Step 4: Input Instance in Hosts File.
Step 5: Run Ansible Ping Module.
Step 6: Terminate AWS Instance.
Thank you reading for all you!!!