2017-11-03 10:32:05 +00:00
|
|
|
# Ansible
|
|
|
|
|
|
|
|
## List all tags
|
|
|
|
|
|
|
|
```shell
|
|
|
|
ansible-playbook -i host.targets -v site.yml --list-tags
|
|
|
|
```
|
|
|
|
|
|
|
|
## Start at a specific task (life savior)
|
|
|
|
|
|
|
|
```shell
|
|
|
|
ansible-playbook -i host.targets -v site.yml --start-at-task "The audacious task"
|
|
|
|
```
|
|
|
|
|
|
|
|
## List hosts
|
|
|
|
|
|
|
|
```shell
|
|
|
|
ansible-playbook -i host.targets -v site.yml --list-hosts
|
|
|
|
```
|
2017-11-15 09:59:46 +00:00
|
|
|
|
|
|
|
## Limit hosts
|
|
|
|
|
|
|
|
```shell
|
|
|
|
ansible-playbook -i host.targets -v site.yml --limit hostname
|
|
|
|
```
|
2018-01-17 09:11:03 +00:00
|
|
|
|
|
|
|
## Jinja2, templates & carriage return
|
|
|
|
|
|
|
|
To tell Jinja2 to not mess with carriage return in templates add
|
|
|
|
|
|
|
|
```
|
|
|
|
#jinja2: trim_blocks:False
|
|
|
|
---
|
|
|
|
```
|
|
|
|
|
|
|
|
at the top of the template file
|