I love the idea around the new block
<http://docs.ansible.com/ansible/playbooks_blocks.html> feature in Ansible
2.
The example in the documentation includes tasks, I wanted to know if there
was other areas/scopes in which we could include them ?
It doesn't look like I can get my two use cases to work. Something like
this (pseudo-code):
1)
# playbook.yml
- name: Include roles
hosts: localhost
roles:
- block:
- role: create
# Anything in the test role can fail
- role: test
always:
- role: destroy
2)
# playbook.yml
block:
- name: Create stuff
hosts: localhost
roles:
- role: create
- name: Test stuff
hosts: test-servers
roles:
- role: test
always:
- name: Destroy stuff
hosts: localhost
roles:
- role: destroy
Any input is appreciated !
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/0290e024-bcf0-4815-8b1b-64c269db47fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.