Non-task Includes

22 views
Skip to first unread message

baldwin wong

unread,
Jan 26, 2015, 7:55:32 PM1/26/15
to ansible...@googlegroups.com
-> % 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?


Henning Eggers

unread,
Jan 29, 2015, 9:48:01 AM1/29/15
to ansible...@googlegroups.com
I think this functionality has been moved to roles. You can call roles with tags and I think also call dependency roles with tags.

Henning
Reply all
Reply to author
Forward
0 new messages