ABOUT

Designed for system administrators who are intending to use Ansible for automation, configuration, and management. Learn how to install and configure Ansible, create and run playbooks to configure systems, and learn to manage inventories.


Automation and orchestration is becoming more common in the enterprise as departments continue to do "more with less." Ansible is an open-source automation tool for managing your configuration, provisioning, and change management. We start with orchestration and change management fundamentals then move to how Ansible works. After building our test environment, we then move to more practical examples and features that Ansible provides. By the end of the course, you will be able to run ad-hoc commands across all your systems, write playbooks, and create roles using the hundreds of modules that come with Ansible. While this course was recorded with Ansible v1.5, all commands should work up to 1.9, though some were deprecated in 1.8


COURSE OBJECTIVES


PRE-REQUISITES


FEATURES


AGENDA


This course is designed for 5 days but with the reduction of some of Lab/Excercise, can be acoomdated in 3 days.


Introduction

  • Syllabus
  • Introduction to Ansible
  • Ansible vs. Other Tools
  • Introduction to YAML
  • YAML Examples
  • Ansible Documentation: Modules

Setup and Configuration

  • Test Environment Setup
  • Download and Installation
  • Ansible Configuration File
  • Ansible Python Dependencies
  • The HOSTS File
  • Overriding the Default HOSTS File
  • Overriding the Default System Ansible.Cfg File
  • Overriding the Default Roles Path
  • Exercise: Exercise: Configure Test Environment for Secure Access
  • Exercise: Exercise: Configuring the Ansible Host Environment
  • Exercise: Exercise: Ansible Facts

Ansible Playbooks

  • Configuring Your 'Ansible' Account
  • Ansible Command Line
  • System Facts
  • System Facts: Common Values for Playbooks
  • Our First Playbook
  • Variables: Inclusion Types
  • Target Section
  • Variable Section
  • Task Section
  • Handler Section
  • Outlining Your Playbook
  • Create a Playbook from Our Outline
  • Optimizing Your Playbook
  • Taking Our Playbook for a Dry Run
  • Asychronous Polling
  • Simple Variable Substitution
  • Lookups
  • RunOnce
  • Local Actions
  • Loops
  • Conditionals
  • Until
  • Notify
  • Vault
  • Prompt - Interactive Playbook
  • Basic Include Statements
  • Tags
  • Basic Error Handling
  • Includes - Breaking Your Playbook Into Discrete Plays
  • Starting At Task or Stepping Through All Tasks
  • Passing Variables Into Playbooks at the Command Line
  • Using Jinja2 Templates
  • LocalAction
  • DelegateTo
  • Exercise: Exercise: Running Ansible Commands Against Hosts
  • Exercise: Exercise: Querying a Remote System
  • Exercise: Exercise: Create a Simple Playbook
  • Exercise: Exercise: Building a Larger Playbook - Target Section
  • Exercise: Exercise: Building a Larger Playbook - Variable Section
  • Exercise: Exercise: Building a Larger Playbook - Task Section
  • Exercise: Exercise: Playbooks - Loops
  • Exercise: Exercise: Playbooks - Notify
  • Exercise: Exercise: Playbooks - Conditionals
  • Exercise: Exercise: Playbooks - Lookup
  • Exercise: Exercise: Playbooks - Local Action
  • Exercise: Exercise: Playbooks - Run Once
  • Exercise: Exercise: Playbooks - Prompt
  • Exercise: Exercise: Playbooks - Includes
  • Exercise: Exercise: Playbooks - Tags
  • Exercise: Exercise: Playbooks - Until
  • Exercise: Exercise: Playbooks - Ignore Errors
  • Exercise: Exercise: Playbooks - Discrete Plays
  • Exercise: Exercise: Playbooks - Create an Outline
  • Exercise: Exercise: Playbooks - Create Playbook from Outline
  • Exercise: Exercise: Playbooks - Optimize Your Outline Playbook
  • Exercise: Exercise: Take Your Playbook for a DryRun
  • Exercise: Exercise: Jinja2 Template Creation
  • Exercise: Exercise: Playbooks - Using Templates
  • Exercise: Exercise: Playbooks - Start At
  • Exercise: Exercise: Playbooks - Step Into
  • Exercise: Exercise: Playbooks - Variables from Command Line
  • Exercise: Exercise: Playbooks - DelegateTo

Roles

  • Roles - The Directory Structure
  • Role Based Tasks
  • Task Order - Pre and Post Tasks
  • Roles - Conditional Execution
  • Roles - Variable Substitution
  • Roles - Handlers
  • Roles - Using Notification
  • Roles - Configuring Alternate Roles Paths
  • Roles - Conditional Include Statements
  • Roles - Waiting For Events
  • Roles - Executing a Task Until
  • Roles - Using Tags
  • Roles - Breaking a Playbook Into a Role
  • Roles - Passing Variables from Command Line
  • Roles - Using Jinja2 Templates
  • Roles - DelegateTo
  • Roles - LocalAction
  • Exercise: Exercise: Roles - Create Directory Structure
  • Exercise: Exercise: Roles - Tasks Within a Role
  • Exercise: Exercise: Roles - Pre and Post Tasks
  • Exercise: Exercise: Roles - Variable Substitution
  • Exercise: Exercise: Roles - Conditional Roles
  • Exercise: Exercise: Roles - Using Templates

Ansible Command Line Usage

  • Ansible Command Line - Installing Packages
  • Ansible Command Line - Services and Hosts
  • Ansible Command Line - Commands and Shells
  • Ansible Command Line - Managing Users
  • Ansible Command Line - Create and Manage Cron Jobs
  • Ansible Command Line - Running Arbitrary Commands
  • Ansible Command Line - Output Tree
  • Exercise: Exercise: Ansible Command Line - Run Arbitrary Module Commands
  • Exercise: Exercise: Ansible Command Line - Installing Packages
  • Exercise: Exercise: Ansible Command Line - Managing Services
  • Exercise: Exercise: Ansible Command Line - Managing Users
  • Exercise: Exercise: Ansible Command Line - Managing CRON Jobs
  • Exercise: Exercise: Ansible Command Line - Run Arbitrary System Commands

Advanced Topics and Ansible 2.0 Updates

  • Galaxy Introduction and Usage
  • Ansible 2.0 - Installation
  • Ansible 2.0 - Playbooks: User Privilege Escalation Changes
  • Ansible 2.0 - Modules: The 'Find' Module
  • Ansible 2.0 - Modules: The 'Package' Module
  • Ansible 2.0 - Roles: User Privilege Escalation Changes
  • Ansible 2.0 - Roles: The 'Find' Module
  • Ansible 2.0 - Roles: The 'Package' Module
  • Exercise: Exercise: The 'Find' Module
  • Exercise: Exercise: The 'Package' Module

Conclusion
Conclusion and Next Steps