Skip to content

Commit 14a3eb0

Browse files
authored
use explicit loop_var for plugin slurp task (#301)
1 parent 8ed3c48 commit 14a3eb0

5 files changed

Lines changed: 15 additions & 5 deletions

playbooks/tasks/collect_core_plugin_operators.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717

1818
- name: Read plugin descriptors
1919
ansible.builtin.slurp:
20-
src: "{{ item }}"
20+
src: "{{ plugin_path }}"
2121
loop: "{{ r_cp_find.files | map(attribute='path') | list }}"
2222
register: r_cp_slurp
23+
loop_control:
24+
loop_var: plugin_path
2325

2426
- name: Build combined plugin operators list
2527
vars:

playbooks/tasks/collect_plugin_registries.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414

1515
- name: Read plugin descriptors
1616
ansible.builtin.slurp:
17-
src: "{{ item }}"
17+
src: "{{ plugin_path }}"
1818
loop: "{{ r_pr_find.files | map(attribute='path') | list }}"
1919
register: r_pr_slurp
20+
loop_control:
21+
loop_var: plugin_path
2022

2123
- name: Build combined plugin registries list
2224
vars:

playbooks/tasks/deploy_foundation_plugins.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616

1717
- name: Read plugin descriptors
1818
ansible.builtin.slurp:
19-
src: "{{ item }}"
19+
src: "{{ plugin_path }}"
2020
loop: "{{ r_foundation_find.files | map(attribute='path') | list }}"
2121
register: r_foundation_slurp
22+
loop_control:
23+
loop_var: plugin_path
2224

2325
- name: Parse foundation plugin descriptors
2426
ansible.builtin.set_fact:

playbooks/tasks/pre_install_validate_plugins.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@
102102

103103
- name: Read plugin descriptors for filtering
104104
ansible.builtin.slurp:
105-
src: "{{ item }}/plugin.yaml"
105+
src: "{{ plugin_dir_path }}/plugin.yaml"
106106
loop: "{{ r_pre_install_plugins.files | map(attribute='path') | map('dirname') | map('dirname') | unique | list | sort }}"
107107
register: r_pre_install_slurp
108+
loop_control:
109+
loop_var: plugin_dir_path
108110
when: r_pre_install_plugins.files | length > 0
109111

110112
- name: Build enabled plugin name list

playbooks/tasks/validate_enabled_plugins.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818

1919
- name: Read plugin descriptors
2020
ansible.builtin.slurp:
21-
src: "{{ item }}"
21+
src: "{{ plugin_path }}"
2222
loop: "{{ _vp_find.files | map(attribute='path') | list }}"
2323
register: _vp_slurp
24+
loop_control:
25+
loop_var: plugin_path
2426

2527
- name: Filter to enabled plugins with requirements
2628
ansible.builtin.set_fact:

0 commit comments

Comments
 (0)