Would like to do the same trick.
Have you found any workaround?

On Monday, December 7, 2015 at 7:15:02 PM UTC+3, David Moreau Simard wrote:
>
> 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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/82eb8a1e-e065-4089-affe-acbaa85cc6a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to