Ansible can solve almost any automation challenge, but we will focus on how simply this can be done. The talk will cover one-liners and other tricks that can be added to your virtual toolbox. There will also be a discussion so come with your own favorite tip or trick for the group that leverage Ansible.
presented by... Mike Dahlgren.. "Almost two decades he bought a simple red fedora from the back of a 'Teach Yourself Linux' book, now he lives that dream at Red Hat as a Senior Cloud Solution Architect. His passion for evangelizing the benefits Open Source has never wavered through a career in private, public, and government agencies."
3. @KeithResar
Automating F5 Load Balancers
Automating your F5 Local traffic managers using Ansible.
Ready to run your first playbook?
Come and see what F5 Networks has been up to with ansible
playbooks. We will discuss and demo all the cool things you can
automate on your BIG-IP.
...presented on June 21st
9. PARALLELISM AND STRATEGIES COMMANDS
Number of forks can easily be defined with -f (default is 5)
$ ansible webservers -a "/sbin/reboot" -f 10
Strategies can be used to control play execution an can be changed
• Lineary strategy = in order execution (Default)
• Free strategy = finish as fast as you can
- hosts: all
strategy: free
tasks:
...
14. Set Defaults in a custom Ansible configuration file.
• No need to type -i myhosts from the CLI
• Remove the useless .retry files
• Can be used anywhere you run Ansible
Precedence model:
* ANSIBLE_CONFIG (an environment variable)
* ansible.cfg (in the current directory)
* .ansible.cfg (in the home directory)
* /etc/ansible/ansible.cfg
16. TIME LIMITING BACKGROUND OPERATIONS
Run script in background (30 Min timeout)
$ ansible webserver -B 3600 -P 0 -a "/bin/long_cmd --do-stuff"
Checking on the status of a previous job
$ ansible web1.example.com -m async_status -a "jid=488359678239.2844"
We can set how often to poll the status (60 seconds)
$ ansible webserver -B 1800 -P 60 -a "/bin/long_cmd --do-stuff"
22. Use patterns quickly and effectively - Continued
Wildcards work
one*.com:dbservers
So can Regex
~(web|db).*.example.com
But would this work?
www[01:50].example.com, db-[a:f].example.com