mirror of
https://github.com/ansible/awx.git
synced 2026-03-21 10:57:36 -02:30
Fix a with_items insights scm reference for newer ansible behavior
Newer ansible versions don't allow with_items to reference undefined variables so we'll provide a default. We'll also update some conditionals to deal with naming requirements changes on insights api endpoints
This commit is contained in:
@@ -128,8 +128,8 @@
|
|||||||
url_password: "{{scm_password}}"
|
url_password: "{{scm_password}}"
|
||||||
force_basic_auth: yes
|
force_basic_auth: yes
|
||||||
force: yes
|
force: yes
|
||||||
when: scm_type == 'insights' and item.name != None
|
when: scm_type == 'insights' and item.name != None and item.name != ""
|
||||||
with_items: "{{insights_output.json}}"
|
with_items: "{{ insights_output.json|default([]) }}"
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
- name: Fetch Insights Playbook
|
- name: Fetch Insights Playbook
|
||||||
@@ -140,8 +140,8 @@
|
|||||||
url_password: "{{scm_password}}"
|
url_password: "{{scm_password}}"
|
||||||
force_basic_auth: yes
|
force_basic_auth: yes
|
||||||
force: yes
|
force: yes
|
||||||
when: scm_type == 'insights' and item.name == None
|
when: scm_type == 'insights' and (item.name == None or items.name == "")
|
||||||
with_items: "{{insights_output.json}}"
|
with_items: "{{ insights_output.json|default([]) }}"
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
- name: detect requirements.yml
|
- name: detect requirements.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user