Merge pull request #47 from noelmcloughlin/fixes

pip states broken on python3 [suse 15]
This commit is contained in:
Javier Bértoli 2019-02-21 14:02:19 -03:00 committed by GitHub
commit df08216a53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,9 +16,15 @@ pip_req_pkgs:
# (requires the python-pip deb/rpm installed, either by the system or listed in # (requires the python-pip deb/rpm installed, either by the system or listed in
# the required packages # the required packages
{% for pn in wanted_pips %} {% for pn in wanted_pips %}
{{ pn }}: packages pips install {{ pn }}:
{%- if grains.os_family in ('Suse',) %} ##workaround https://github.com/saltstack-formulas/docker-formula/issues/198
cmd.run:
- name: /usr/bin/pip install {{ pn }}
{%- else %}
pip.installed: pip.installed:
- name: {{ pn }}
- reload_modules: true - reload_modules: true
{%- endif %}
- require: - require:
- pkg: pip_req_pkgs - pkg: pip_req_pkgs
{% if req_states %} {% if req_states %}
@ -29,6 +35,12 @@ pip_req_pkgs:
{% endfor %} {% endfor %}
{% for upn in unwanted_pips %} {% for upn in unwanted_pips %}
{{ upn }}: packages pips remove {{ upn }}:
pip.removed {%- if grains.os_family in ('Suse',) %}
cmd.run:
- name: /usr/bin/pip uninstall {{ pn }}
{%- else %}
pip.removed:
- name: {{ upn }}
{%- endif %}
{% endfor %} {% endfor %}