mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Reworking v2 play iterator and fixing some other bugs
Still not working quite right: * dynamic includes are not adding the included tasks yet * running roles with tags not quite working right
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
- hosts: localhost
|
||||
- hosts: all
|
||||
connection: local
|
||||
gather_facts: no
|
||||
gather_facts: yes
|
||||
tasks:
|
||||
- block:
|
||||
- command: /bin/false
|
||||
- debug: msg="you shouldn't see me"
|
||||
- debug: msg="this is the first task"
|
||||
- fail:
|
||||
when: inventory_hostname == "l2"
|
||||
- debug: msg="only l1 and l3 should see me"
|
||||
rescue:
|
||||
- debug: msg="this is the rescue"
|
||||
- command: /bin/false
|
||||
- debug: msg="you shouldn't see this either"
|
||||
- debug: msg="no host should see this run"
|
||||
always:
|
||||
- debug: msg="this is the always block, it will always be seen"
|
||||
when: foo|default('') != "some value"
|
||||
tags:
|
||||
- foo
|
||||
- bar
|
||||
- debug: msg="you should only see l1 and l3 run this"
|
||||
|
||||
Reference in New Issue
Block a user