This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do.
Introduction
This book provides an introduction to the Ansible language.
Ansible is a popular open source IT automation technology for scripting applications in a wide variety of domains.
It is free, portable, powerful, and remarkably easy and fun to use.
This book is a tool to learn the Ansible automation technology with some real-life examples.
Whenever you are new to automation or a profession automation engineer, this books goal is to bring you quickly up to speed on the fundamentals of the core Ansible language.
Every successful IT department needs automation nowadays for bare metal servers, virtual machines, could, containers, and edge computing. Automate your IT journey with Ansible automation technology.
Im going to teach you example by example how to accomplish the most common System Administrator tasks.
Each of the 10+ lessons summarizes a real-life scenario and the most important module description and the most important parameter to succeed in your journey. Moreover, each code is battle proved in the real life. Console interaction and verification are included in every video. A mundane activity like printing a text/variable during execution, Pause execution, How to Pass Variables to Ansible Playbook in the command line, breaking a string over multiple lines, Ansible ansible_hostname vs inventory_hostname, setting remote environment per task or play, executing a command on the Ansible localhost, three options to Safely Limit Ansible Playbooks Execution to a Single Machine, command vs shell modules, write a Variable to a File and these are only some of the long lists included in the course.
There are some Ansible codes usable in all the Linux systems.
Are you ready to automate your day with Ansible to the next level?
Modern IT Infrastructure
Deploying and managing applications requires more and more server machines reliable and efficient. Traditinally, System Administrators were tacking care of this burden for internal (developers) and external (users) stakeholders that interact with the systems.
The day-to-day tasks of a System Administrator invoved manual installation of software, change of configurations, and administration of services on individual servers.
As data centers grew, and hosted applications became more complex, administrators realized they couldnt scale their manual systems management as fast as the applications demands. API-driven server management and configuration management tools like Ansible helped make things manageable for a time.
This was the rise of the application-as-service, developer-centric methologies (DevOps), microservices and serverless application architecture meant that a more seismic shift was coming. Instead of thinking in terms of servers and infrastructure, developers expect to be able to manage containerized application lifecycles, with no regard for the servers on which their applications run.
Modern business applications require one or more of the following features:
- self-healing infrastructure
- auto-scaling / elastic
- high-availability with multi-server failover
- flexible or multi-tier storage backends
- multi-cloud compatibility
The containerized app development and deployment became more and more popular with a huge number of technologies to realtime check these boxes, like Apache Mesos and Docker Swarm. Some cloud vendors like Amazon Web Services (AWS) even built their own container scheduling products (Elastic Container Service) to meet the needs of cloud-native applications.
Whois Luca Berton
Im Luca Berton and were going to have a lot of fun together.
First of all, let me introduce myself.
Ive been Ansible Software Quality Engineer of Red Hat, based in the Czech Republic, even if Im Italian.
Ive been more than 15 years System Administration, working with infrastructure, either on-premise or on the major cloud providers.
Im an enthusiast of the Open Source support the community by sharing my knowledge in different events of public access.
Im also a co-founder of my hometown Linux Users Group, visited by Richard Stallman, the founder of the Free Software Movement.
I consider myself a lazy person so I always try new ways to automate the repetitive task of my work.
After years of Perl, Bash, and python scripting I landed in Ansible technology. I took the certification and worked for more than a year with the Ansible Engineer Team.
I consider Ansible the best infrastructure automation technology nowadays, its human-readable, the learning curve is accessible, and very requested by the recruiters in the market.
This ultimate guide contains all of the obvious and not-so-obvious solutions using Ansible automation.
In every lesson of this course, Im going to share with you one specific use case, the possible solution, the code, the execution, and the verification of the target system.
All these solutions are battle-tested and used by me in my everyday automation.
You could easily jump between lessons and review again all the times that you need.
Awards & Recognition
2022
- Ansible Anwendertreffen - From Zero to Hero: How to build the Ansible Pilot Community - by Luca Berton (Red Hat CZ) 15:15 - 16:00 15 Feb 2022
- Red Hat Ansible Playbook included in RHSB-2021-009 Log4Shell - Remote Code Execution - log4j (CVE-2021-44228) 12 Jan 2022
- AWS Tip Set sysctl kernel parameters Ansible module sysctl 12 Jan 2022
- The Ansible Bullhorn #41 - A Newsletter for the Ansible Developer Community 7 Jan 2022
2021
- The Ansible Bullhorn #34 - A Newsletter for the Ansible Developer Community 17 Sep 2021
The course is going to keep track of the evolution of the Ansible technology adding more content whenever is needed.
Are you ready to have fun?
Ansible For Beginners With Examples
In this chapter youre going to discover the Ansible Basics, Architecture and Terminology.
What is Ansible
In this chapter, Ill explain to you what is Ansible and why it is so powerful for your IT department.
Ansible was started in February 2012, when Michael DeHaan, the projects founder, took inspiration from several tools he had written prior, along with some hands-on experience with the state of configuration management at the time. Some of Ansibles unique attributes like its module-based architecture and agentless approach quickly attracted attention in the open source world.
Ansible
- Infrastructure Automation tool
- Open Source infrastructure as code
First of all, lets begin our adventure with the fabulous Open Source technology named Ansible. It is classified as an Infrastructure Automation tool, so you could automate your System Administrator tasks very easily. Infrastructure as code is the process of managing and provisioning computer data centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools. Ansible follows the DevOps principles. With Ansible you could deploy your infrastructure as code on-premise and on the most well-known public cloud provider.