Materials for Tech Summit Ansible Class
This introductory class covers the following topics:
- Introduction to the Ansible Automation Tool
- Introduction to YAML
- Introduction to Ansible's variables
- High Availabilty with Ansible
We are leveraging the Introduction to Automation & Orchestration Lab
The Lab Topology and Environment Information Can be found at: Lab Topology and Environment
Directions to startup and login to the UDF demo environment can be found at: F5 Unified Demo Framework(UDF)
cd /home/ubuntu; wget https://raw.githubusercontent.com/mcgonagle/f5-ansible-ts/master/misc/user_repos.json
{
"repos": [
{
"name":"f5-ansible-ts",
"repo":"https://github.com/mcgonagle/f5-ansible-ts.git",
"branch":"master",
"skip":false,
"skipinstall":true
}
]
}
sudo docker run -p 8080:80 -p 2222:22 --rm -it -v /home/ubuntu/user_repos.json:/tmp/user_repos.json -e SNOPS_GH_BRANCH=develop f5devcentral/f5-super-netops-container:develop-ansible
- ansible.cfg - Ansible config file
- group_vars - Place to store variables applicable to groups such as data centers
- host_vars - Place to store variables specific to hosts
- hosts - Hosts inventory list
- password.yml - ansible-vault password file, password to unlock is "password"
- playbooks - Ansible playbooks of "plays" for interacting with our BIG-IP systems
- roles - More organized than playbooks
- run_ansible.sh - Shell helper script for running playbooks
autocmd FileType yaml setlocal ai ts=2 sw=2 et colorcolumn=1,3,5,7,9,11,13 nu
set cc=
./run_ansible.sh -i
./run_ansible.sh -1
Ansible Variables and their Precedence
./run_ansbile -v
./run_ansible --irule
./run_ansible --iapp
ansible-playbook playbooks/create_HA.yml --ask-vault-pass -e @password.yml -vvv