→ % cat playbook1.yml
- hosts: 127.0.0.1
gather_facts: false
tasks:
-
name: Task1
shell: echo “This is Task1” -
include: playbook2.yml tags=play2
→ % cat playbook2.yml
- hosts: 127.0.0.1
gather_facts: false
tasks:
-
name: Task2
shell: echo “This is Task2” -
include: playbook3.yml tags=play3
→ % cat playbook3.yml
- hosts: 127.0.0.1
gather_facts: false
tasks:
- name: Task3
shell: echo “This is Task3”
→ %
→ % ansible-playbook playbook1.yml -t ‘play2’
ERROR: tag(s) not found in playbook: play2. possible values:
Hi,
In some devel version of 1.8 I was able to run this play with no problem.
Now I am unable to do it this way due to the changes.
Since most of our plays are built this way… is there a way to call playbooks within playbooks with a tag?
If not, what would the best way to fix this problem?