Skip to content

Commit 23e5fc0

Browse files
Use become instead of sudo for image pulls to preserve auth context
Signed-off-by: mdafsanhossain <Mdafsan.Hossain@ibm.com>
1 parent 515e394 commit 23e5fc0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ansible/roles/run-test-target/tasks/pull-images.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
delegate_to: localhost
1313

1414
- name: Pull QA images
15-
command: "{{ 'sudo' if runtime_as_root else '' }} {{ runtime_command }} pull {{ item.value }}-{{ qa_tag }}"
15+
become: "{{ runtime_as_root }}"
16+
command: "{{ runtime_command }} pull {{ item.value }}-{{ qa_tag }}"
1617
loop: "{{ images.qa | dict2items }}"
1718
# parallel for speeeeed
1819
async: 300
@@ -21,7 +22,8 @@
2122
ignore_errors: true
2223

2324
- name: Pull non-QA images
24-
command: "{{ 'sudo' if runtime_as_root else '' }} {{ runtime_command }} pull {{ item.value }}"
25+
become: "{{ runtime_as_root }}"
26+
command: "{{ runtime_command }} pull {{ item.value }}"
2527
loop: "{{ images.non_qa | dict2items }}"
2628
# parallel for speeeeed
2729
async: 300

0 commit comments

Comments
 (0)