Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Example of import_tasks/include_tasks with tags
- name: Task 0
debug: msg="No tag"
- name: Task 1
debug: msg="tag1"
tags: [ tag1 ]
- name: Task 2
debug: msg="tag2"
tags: [ tag2 ]
---
- hosts: localhost
connection: local
tasks:
- include: main.yml
tags: [ tag1 ]
---
- hosts: localhost
connection: local
tasks:
- import_tasks: main.yml
tags: [ tag1 ]
---
- hosts: localhost
connection: local
tasks:
- include_tasks: main.yml
tags: [ tag1 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment