Skip to content
Snippets Groups Projects
Unverified Commit 775851b0 authored by palme's avatar palme Committed by GitHub
Browse files

[flatcar] add python dependency check for helm-apps (#10192)

* add pyyaml install via task instead of package

* Change condition for better consistency in the codebase
parent f8fadf53
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,11 @@ ...@@ -17,6 +17,11 @@
package: package:
name: "{{ pyyaml_package }}" name: "{{ pyyaml_package }}"
state: present state: present
when: pyyaml_package is defined
- name: Helm | Install PyYaml [flatcar]
include_tasks: pyyaml-flatcar.yml
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
- name: Helm | Download helm - name: Helm | Download helm
include_tasks: "../../../download/tasks/download_file.yml" include_tasks: "../../../download/tasks/download_file.yml"
......
---
- name: Get installed pip version
command: "{{ ansible_python_interpreter if ansible_python_interpreter is defined else 'python' }} -m pip --version"
register: pip_version_output
ignore_errors: yes
changed_when: false
- name: Get installed PyYAML version
command: "{{ ansible_python_interpreter if ansible_python_interpreter is defined else 'python' }} -m pip show PyYAML"
register: pyyaml_version_output
ignore_errors: yes
changed_when: false
- name: Install pip
command: "{{ ansible_python_interpreter if ansible_python_interpreter is defined else 'python' }} -m ensurepip --upgrade"
when: (pyyaml_version_output is failed) and (pip_version_output is failed)
- name: Install PyYAML
ansible.builtin.pip:
name:
- PyYAML
when: (pyyaml_version_output is failed)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment