Skip to content

Commit

Permalink
Use include_tasks to respect group_vars
Browse files Browse the repository at this point in the history
With import_tasks all imports are processed very early, where some
variables, like group_vars might not be yet processed.

So if upload_helm_chart_method is defined in group_vars rather then
extra vars, value will be ignored and role will proceed with it's
defaults. Include in it's turn is more dynamic and will respect
group_vars.
  • Loading branch information
noonedeadpunk committed Oct 5, 2024
1 parent 9ecce5d commit c9dcdd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/upload_helm_chart/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- name: Import help chart upload method tasks
ansible.builtin.import_tasks: "{{ upload_helm_chart_method }}.yml"
- name: Include help chart upload method tasks
ansible.builtin.include_tasks: "{{ upload_helm_chart_method }}.yml"

0 comments on commit c9dcdd1

Please sign in to comment.