Commit 28afe36e authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Thomas Gambier

playbook: Support succeeded and success

We know that on Debian 9 used version of ansible does not work with success,
so let's make the "when" part depending on the distribution.

/reviewed-on nexedi/slapos.package!108
parent 4a745c54
...@@ -16,18 +16,10 @@ ...@@ -16,18 +16,10 @@
shell: easy_install pip shell: easy_install pip
when: pip_installed is failed and pip3_installed is failed when: pip_installed is failed and pip3_installed is failed
- name: Install/Upgrade latest slapos.libnetworkcache using pip - name: Install slapcache on Debian != 9
shell: pip install --upgrade slapos.libnetworkcache include: pip_installations_success.yml
when: pip_installed is success when: ansible_distribution == "Debian" and ansible_distribution_major_version != "9"
- name: Install/Upgrade latest slapcache using pip - name: Install slapcache on Debian == 9
shell: pip install --upgrade slapcache include: pip_installations_succeeded.yml
when: pip_installed is success when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Install/Upgrade latest slapos.libnetworkcache using pip3
shell: pip3 install --upgrade slapos.libnetworkcache
when: pip3_installed is success
- name: Install/Upgrade latest slapcache using pip3
shell: pip3 install --upgrade slapcache
when: pip3_installed is success
# Installations on Ansible which supports succeeded
- name: Install/Upgrade latest slapos.libnetworkcache using pip
shell: pip install --upgrade slapos.libnetworkcache
when: pip_installed is succeeded
- name: Install/Upgrade latest slapcache using pip
shell: pip install --upgrade slapcache
when: pip_installed is succeeded
- name: Install/Upgrade latest slapos.libnetworkcache using pip3
shell: pip3 install --upgrade slapos.libnetworkcache
when: pip3_installed is succeeded
- name: Install/Upgrade latest slapcache using pip3
shell: pip3 install --upgrade slapcache
when: pip3_installed is succeeded
# Installations on Ansible which supports *ONLY* success
- name: Install/Upgrade latest slapos.libnetworkcache using pip
shell: pip install --upgrade slapos.libnetworkcache
when: pip_installed is success
- name: Install/Upgrade latest slapcache using pip
shell: pip install --upgrade slapcache
when: pip_installed is success
- name: Install/Upgrade latest slapos.libnetworkcache using pip3
shell: pip3 install --upgrade slapos.libnetworkcache
when: pip3_installed is success
- name: Install/Upgrade latest slapcache using pip3
shell: pip3 install --upgrade slapcache
when: pip3_installed is success
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment