Skip to content

Commit

Permalink
Fix: Use import_tasks so that tags set on the imported tasks are visi…
Browse files Browse the repository at this point in the history
…ble when the play is started

import_tasks does do pre-processing
include_tasks doesn't do pre-processing

See: https://docs.ansible.com/ansible/2.9/user_guide/playbooks_reuse_includes.html
  • Loading branch information
pmeulen committed Jul 17, 2024
1 parent 43d8786 commit 9d6e672
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/stepupmiddleware/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- name: Include docker tasks when running docker
include_tasks: docker.yml
import_tasks: docker.yml
when: "'docker' in group_names"

- name: Include vm tasks when running on a vm
include_tasks: vm.yml
import_tasks: vm.yml
when: "'docker' not in group_names"

0 comments on commit 9d6e672

Please sign in to comment.