0% found this document useful (0 votes)
149 views5 pages

Ansible Essentials: 5 Days Hands On

This document provides an overview of a 5 day Ansible Essentials training course. It covers topics such as Ansible fundamentals, using Ansible for server and network operations, customizing Ansible with roles, dynamic inventory, and Ansible for cloud platforms. It also includes a detailed daily schedule and list of hands-on labs.

Uploaded by

karnde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
149 views5 pages

Ansible Essentials: 5 Days Hands On

This document provides an overview of a 5 day Ansible Essentials training course. It covers topics such as Ansible fundamentals, using Ansible for server and network operations, customizing Ansible with roles, dynamic inventory, and Ansible for cloud platforms. It also includes a detailed daily schedule and list of hands-on labs.

Uploaded by

karnde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Ansible Essentials

5 days Hands on
Ansible is growing in popularity for good reasons. It’s easy to understand, far simpler than Python, and
extremely powerful. While Python can be used to do just about anything, Ansible is used to bring
structure and consistency to system deployments, implementations, and changes. Students tempted to
write a complex Python script to do a networking automation task will discover that problem is already
solved by an Ansible module. Lots of unnecessary Python scripts can be eliminated by using Ansible
whenever possible. Ansible can be used for both network and server administrators alike.

Lecture

Day 1 (Ansible Introduction)


1. 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

2. Installation

● Configuration requirements on the control machine


● Python requirements on the host
● Using ansible raw to install Python
3. Ansible config file and directory structure

● ansible.cfg
● Ansible Inventory
● roles

4. Ansible Static Inventory


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

5. YAML

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

copyright Alta3 Research Inc 1


Day 2 (Ansible for Server Operations)
6. Ansible Ad hoc commands
● Ad hoc command syntax
● Parallel Shell commands
● Managing packages
● Managing users and groups
● Gathering facts
● ad hoc cheat sheet
7. 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
8. Ansible config file and directory structure
● ansible.cfg
● Best practices concerning directory structures and organization
● Host Inventory and ansible_vars
● Introduction to roles
9. Key Server Modules to Know

● Understanding modules documentation


● setup / gather_facts
● copy
● apt / yum / pip
● command / shell
● git
● get_url
● debug
● lineinfile

Day 3 (Ansible for Network Operations)


10. Ansible and Jinja
● What is Jinja2?
● jinja variables
● jinja filters
● jinja tests
● How to use ansible template
● Review of the ansible template documentation
11. Conditional and Looping Tasks

● Variables and Loops


● Using Complex Variables in Loops
● 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?
12. Ansible Network Solutions with Ansible (focus on Juniper and Cisco)
● Writing Cisco and Juniper playbooks
● Modules for Cisco (IOS, NXOS, IOSXR, etc)

copyright Alta3 Research Inc 2


● Exploring Juniper solutions
● Built in Juniper modules
● Role based Juniper modules
● Installing a module from Juniper vendor
● Securing credentials / best practices
● New additions within the latest version of Ansible (v2.9)

Day 4 (Customizing Ansible & Ansible for Cloud)


13. 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
14. Ansible for OpenStack and AWS
● Overview of OpenStack
● Understanding the OpenStack client
● What is openstack-sdk (or shade)?
● clouds.yaml
● Installing openstack-sdk
● Using openstack-sdk
● OpenStack modules
● os_network
● os_subnet
● os_router
● os_server
● os_server_action
● os_security_group
● os_security_group_rule
● What is boto?
● Installing boto for AWS
● AWS modules
● ec2
● aws_s3_bucket_info
● redshift

15. 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

Day 5 (Ansible Playbook Design & Review)


16. 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
17. Playbook Best Practices
● Directory Layout

copyright Alta3 Research Inc 3


● Use Dynamic Inventory With Clouds
● How to Differentiate Staging vs Production
● Group And Host Variables
● Top Level Playbooks Are Separated By Server Type
18. Ansible Tower / AWX Essentials
● What is Ansible Tower and AWX
● Why you should consider using Jenkins as a replacement for Ansible Tower
● Pushing and pulling playbooks from GitHub

Labs:
1. SSH client and server configs
2. RSA key gen
3. Methods for Installing Ansible
4. Ansible Host Inventory
5. Ad-Hoc Modules and Gather Facts
6. Elevated Ad-Hoc Commands
7. Running your first Playbook
8. Ad-Hoc Raw Commands
9. Debug, Loops, and YAML Lists
10. When Conditionals, YAML Dictionaries, and Jinja
11. ansible.cfg setup
12. Building Playbooks - Bootstrap with raw, group and user Modules
13. Mapping YAML Vars Files in Playbooks
14. Ansible Modules - shell
15. Ansible Module - copy
16. Ansible Module - apt
17. Ansible Module - yum
18. Ansible Module - get_url
19. Ansible Module - file
20. Ansible Module - git
21. Ansible Module - template
22. Playbook Tags
23. Ansible Module - lineinfile and replace
24. Manually Launch an OpenStack Instance
25. OpenStack, Ansible and Shade
26. YAML, JSON, Dynamic, and Cloud Inventories
27. Configuring a Web Service with Ansible
28. Ansible Handlers
29. Ansible Error Handling
30. pre_tasks, roles, tasks, post_tasks, and handlers
31. Exploring Switches with Ansible
32. network_cli Playbook
33. Backup and Save Config - Cisco, Juniper, Arista, and Many More!
34. Network Playbooks and Vendor Specific Modules
35. Simplifying Network Playbooks with Agnostic Modules
36. Reading Variables into Playbooks
37. Ansible script module
38. Ansible Lookup Plugin
39. Ansible Playbook Output Logging
40. Ansible Keywords - register and when
41. Ansible Galaxy
42. Ansible Vault
43. Ansible Tower
44. (Optional Case Study) Ansible for Palo Alto PanOS and Panorama
45. (Optional Case Study) Ansible for Juniper Junos Core and Role Modules
46. (Optional Case Study) Ansible for VMWare NSX Networking

copyright Alta3 Research Inc 4


47. (Optional Case Study) Ansible NAPALM for Network Automation

copyright Alta3 Research Inc 5

You might also like