Commit da12b126 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

playbook: cleanup slapcache roles

We are now using recent enough ansible to always use succeeded keyword.

Also this fixes a leftover include.
parent fff54435
......@@ -12,14 +12,30 @@
ignore_errors: True
register: pip3_installed
- name: Install slapcache on Debian < 9
include_tasks: pip_installations_success.yml
when: ansible_distribution == "Debian" and ansible_distribution_major_version|int < 9
- name: Make sure pip is installed
shell: easy_install pip
when: pip_installed is failed and pip3_installed is failed
- name: Install slapcache on Debian >= 9
include_tasks: pip_installations_succeeded.yml
when: ansible_distribution == "Debian" and ansible_distribution_major_version|int >= 9
- name: Install/Upgrade latest slapos.libnetworkcache using pip
shell: pip install --upgrade slapos.libnetworkcache
when: pip_installed is succeeded
environment:
PIP_BREAK_SYSTEM_PACKAGES: 1
- name: Install slapcache on Ubuntu
include: pip_installations_succeeded.yml
when: ansible_distribution == "Ubuntu"
- name: Install/Upgrade latest slapcache using pip
shell: pip install --upgrade slapcache
when: pip_installed is succeeded
environment:
PIP_BREAK_SYSTEM_PACKAGES: 1
- name: Install/Upgrade latest slapos.libnetworkcache using pip3
shell: pip3 install --upgrade slapos.libnetworkcache
when: pip3_installed is succeeded
environment:
PIP_BREAK_SYSTEM_PACKAGES: 1
- name: Install/Upgrade latest slapcache using pip3
shell: pip3 install --upgrade slapcache
when: pip3_installed is succeeded
environment:
PIP_BREAK_SYSTEM_PACKAGES: 1
# Installations on newest Ansible which supports succeeded
- name: Make sure pip is installed
shell: easy_install pip
when: pip_installed is failed and pip3_installed is failed
- name: Install/Upgrade latest slapos.libnetworkcache using pip
shell: pip install --upgrade slapos.libnetworkcache
when: pip_installed is succeeded
environment:
PIP_BREAK_SYSTEM_PACKAGES: 1
- name: Install/Upgrade latest slapcache using pip
shell: pip install --upgrade slapcache
when: pip_installed is succeeded
environment:
PIP_BREAK_SYSTEM_PACKAGES: 1
- name: Install/Upgrade latest slapos.libnetworkcache using pip3
shell: pip3 install --upgrade slapos.libnetworkcache
when: pip3_installed is succeeded
environment:
PIP_BREAK_SYSTEM_PACKAGES: 1
- name: Install/Upgrade latest slapcache using pip3
shell: pip3 install --upgrade slapcache
when: pip3_installed is succeeded
environment:
PIP_BREAK_SYSTEM_PACKAGES: 1
# Installations on old Ansible where tests are filter like
- name: Make sure pip is installed
shell: easy_install pip
when: pip_installed | failed and pip3_installed | failed
- name: Install/Upgrade latest slapos.libnetworkcache using pip
shell: pip install --upgrade slapos.libnetworkcache
when: pip_installed | success
- name: Install/Upgrade latest slapcache using pip
shell: pip install --upgrade slapcache
when: pip_installed | success
- name: Install/Upgrade latest slapos.libnetworkcache using pip3
shell: pip3 install --upgrade slapos.libnetworkcache
when: pip3_installed | success
- name: Install/Upgrade latest slapcache using pip3
shell: pip3 install --upgrade slapcache
when: pip3_installed | 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