Skip to content

Instantly share code, notes, and snippets.

@mynameisrufus
mynameisrufus / ansible-tower-backup-pull.yml
Created December 2, 2015 01:43
Migration of Ansible Tower 2.1.2 to 2.4.1 with large database
---
# This orchestration will perform a backup of a Tower machine and pull the
# backup files down to a bastion server for use with a later restore.
#
# http://docs.ansible.com/ansible-tower/latest/html/installandreference/upgrade_tower.html
# https://support.ansible.com/hc/en-us/articles/203295497-Tower-Manual-Backup-Restore
- name: Pull Ansible Tower backup
hosts: tower
@marcusphi
marcusphi / ansible_conditionals_examples.yaml
Created October 2, 2013 09:48
Ansible 1.3 Conditional Execution -- Very complete example with comments -- I find the conditional expressions to be ridiculously hard to get right in Ansible. I don't have a good model of what's going on under the surface so I often get it wrong. What makes it even harder is that there has been at least three different variants over the course …
---
# This has been tested with ansible 1.3 with these commands:
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts"
# NB: The type of the variable is crucial!
- name: Ansible Conditionals Examples
hosts: $hosts
vars_files: