Browse Source

Fix bug finding pip install method

An fatal error results due to the install script search '.find' not existing
on the dict result of the install script check task. Instead the .find should
be searching the stdout key of the install script check task results dict.

Ie. .find() is a string search, not a dict search.

The following fatal error results when using .find() on the dict:

The conditional check 'pip_install_script.find('get-pip.py') != -1' failed.
The error was: error while evaluating conditional (pip_install_script.find('get-pip.py') != -1): 'dict object' has no attribute 'find'

Change-Id: I4b929d58057b3d249007fe7c563439ab65faf4ce
Logan V 4 months ago
parent
commit
2f586ab435
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      tasks/install.yml

+ 1
- 1
tasks/install.yml View File

@@ -35,6 +35,6 @@
35 35
   changed_when: False
36 36
 
37 37
 - include_tasks: "install_{{ pip_offline_install | ternary('offline', 'online') }}.yml"
38
-  when: pip_install_script.find('get-pip.py') != -1 # skip get-pip.py if a suitable pip is installed
38
+  when: pip_install_script.stdout.find('get-pip.py') != -1 # skip get-pip.py if a suitable pip is installed
39 39
 
40 40
 - include_tasks: install_source.yml

Loading…
Cancel
Save