Fix issue when noise neaks into get_python_info.py script stdout
Change-Id: I36f9e80199115b628993814f8751ce834f84f467
This commit is contained in:
parent
ed84b3fcd6
commit
1cb0c3d814
@ -50,7 +50,8 @@ def main():
|
||||
info = {'version': version,
|
||||
'executable': sys.executable,
|
||||
'executables': executables}
|
||||
output = json.dumps(info, indent=4, sort_keys=True)
|
||||
output = json.dumps(info)
|
||||
assert output.startswith('{')
|
||||
print(output)
|
||||
|
||||
|
||||
|
@ -34,14 +34,17 @@
|
||||
cmd: get_python_info.py --base --quiet
|
||||
executable: '{{ get_python_exe.stdout_lines | first }}'
|
||||
register: get_python_info
|
||||
changed_when: no
|
||||
changed_when: false
|
||||
|
||||
|
||||
- name: "set python_info['{{ python_command }}'] fact"
|
||||
set_fact:
|
||||
python_info: >
|
||||
{{ python_info | combine({python_command:
|
||||
(get_python_info.stdout | from_json)}) }}
|
||||
(item | from_json)}) }}
|
||||
loop: '{{ get_python_info.stdout_lines }}'
|
||||
when: item.startswith('{')
|
||||
failed_when: (python_info | length) == 0
|
||||
|
||||
|
||||
- name: "upgrade '{{ python_command }}' packages to the latest versions"
|
||||
|
Loading…
x
Reference in New Issue
Block a user