Ansible 101 - Essentials

Price
$2,495.00 USD

Duration
5 Days

 

Delivery Methods
Virtual Instructor Led
Private Group

Course Overview

Ansible is a powerful IT automation engine used to accelerate DevOps initiatives. It’s an open-source tool that executes repetitive network and system admin tasks. Ansible is used to bring structure and consistency to system deployments, implementations, and changes.

Course Objectives

  • Overview of Ansible and critical modules
  • AI LLM prompt engineering for generating Ansible solutions
  • Ansible collections for content delivery
  • Building roles for code reuse
  • YAML formatting
  • Playbook construction and order of execution
  • Jinja2 templating
  • Static and Dynamic inventory management
  • Credential Management and Encryption with Vault
  • Finding solutions on Ansible Galaxy
  • Version controlling code with Git

Who Should Attend?

  • DevOps Engineers
  • System and Cloud Administrators
  • Network Engineers and Developers
  • Python Developers
  • Top-rated instructors: Our crew of subject matter experts have an average instructor rating of 4.8 out of 5 across thousands of reviews.
  • Authorized content: We maintain more than 35 Authorized Training Partnerships with the top players in tech, ensuring your course materials contain the most relevant and up-to date information.
  • Interactive classroom participation: Our virtual training includes live lectures, demonstrations and virtual labs that allow you to participate in discussions with your instructor and fellow classmates to get real-time feedback.
  • Post Class Resources: Review your class content, catch up on any material you may have missed or perfect your new skills with access to resources after your course is complete.
  • Private Group Training: Let our world-class instructors deliver exclusive training courses just for your employees. Our private group training is designed to promote your team’s shared growth and skill development.
  • Tailored Training Solutions: Our subject matter experts can customize the class to specifically address the unique goals of your team.

Agenda

Ansible Introduction

  • Ansible definition
  • Exploring modules
  • Building a task
  • Places to define Ansible vars
  • hosts aka \"Inventory\"
  • Creating a A play
  • Looking at the “handler”
  • Running a playbook
  • Introduction to YAML
  • Requirements for connecting to remote hosts

Installation

  • Configuration requirements on the control machine
  • Python requirements on the host
  • Using ansible raw to install Python

Ansible Static Inventory

  • Defining Hosts and Groups
  • Host and Group variables
  • Groups of Groups
  • Default Groups

Ansible Tower / AWX

  • What is Ansible Tower and AWX
  • Why you should consider using Jenkins as a replacement for Ansible Tower
  • Pushing and pulling playbooks from GitHub

Roles and Ansible Galaxy

  • Why we need Ansible Roles
  • Role Directory Structure
  • Using Roles
  • Role default variables
  • Converting a Playbook to a Role
  • Exploring Ansible Galaxy
  • Running a role from Ansible Galaxy

YAML

  • YAML Gotchas
  • YAML Dictionary
  • YAML list
  • YAML list of dictionaries
  • YAML Alternate format
  • Relationship to JSON

Ansible Ad hoc commands

  • Ad hoc command syntax
  • Parallel Shell commands
  • Managing packages
  • Managing users and groups
  • Gathering facts
  • ad hoc cheat sheet

Writing a Simple Playbook

  • Elements of a well written playbook
  • A well-written Ansible play
  • Using include files for tasks
  • A well-written ansible variable file
  • A well-written ansible inventory file

Ansible config file and directory structure

  • ansible.cfg
  • Best practices concerning directory structures and organization
  • Host Inventory and ansible_vars
  • Introduction to roles

Playbook Best Practices

  • Directory Layout
  • Use Dynamic Inventory With Clouds
  • How to Differentiate Staging vs Production
  • Group And Host Variables
  • Top Level Playbooks Are Separated By Server Type

Ansible config file and directory structure

  • ansible.cfg
  • Ansible Inventory
  • roles

Server Modules to Know

  • Modules documentation
  • setup / gather_facts
  • copy
  • apt / yum / pip
  • command / shell
  • git
  • get_url
  • debug
  • lineinfile

Jinja2

  • What is Jinja2?
  • Jinja2 variables
  • Jinja2 filters
  • Jinja2 tests
  • How to use templates
  • Review of templates

Conditional and Looping Tasks

  • Variables and Loops
  • Using Complex Variables in Loop
  • Variables and Templates
  • Using variables in conditions
  • Blocks
  • Prompts
  • Getting variables from the system
  • Setting variables in playbooks
  • Registered variables
  • Getting variables from the command line
  • Where is the best source to derive variables values?

Ansible Network Solutions

  • Writing Cisco and Juniper playbooks
  • Modules for Cisco
  • Exploring Juniper solutions
  • Built in Juniper modules
  • Role based Juniper modules
  • Installing a module from Juniper vendor
  • Securing credentials
  • Latest version of Ansible

Dynamic Inventory Management

  • What is Dynamic Inventory?
  • A review of static Inventory Practices
  • Using JSON as an Inventory Source
  • Using YAML as an Inventory Source
  • Pulling Inventory from an API
  • AWS EC2 Example
  • OpenStack Example

OpenStack and AWS

  • Overview of OpenStack
  • Understanding the OpenStack client
  • What is openstack-sdk
  • clouds.yaml
  • Installing openstack-sdk
  • Using openstack-sdk
  • OpenStack modules
  • os_network
  • os_subnet
  • os_router
  • os_server
  • os_server_action
  • os_security_group
  • What is boto?
  • Installing boto for AWS
  • AWS modules
  • ec2
  • aws_s3_bucket_info
  • redshift

Variables and Python

  • Jinja Filters for variable manipulation
  • Using Python within playbooks for variable manipulation
  • Best practices for Variables
  • Securing credentials with Ansible Vault
  • Encrypting Playbooks with Ansible Vault
 

Get in touch to schedule training for your team
We can enroll multiple students in an upcoming class or schedule a dedicated private training event designed to meet your organization’s needs.

 



Do You Have Additional Questions? Please Contact Us Below.

contact us contact us 
Contact Us about Starting Your Business Training Strategy with New Horizons