Files
tripleo-quickstart-extras/roles/overcloud-prep-containers/tasks/overcloud-prep-containers.yml
Sorin Sbarnea 16649df878 lint: bumping to latest versions
- run `pre-commit autoupdate` and fixed new issues
- adopted newer pre-commit config for ansible-lint 4.2.0+
- fixed some reported broken rules
- temporary disabled few rules, just to contain the size of of review,
  planning to drop/fix them in follow-ups.

Change-Id: I807ba4e919527be56c85ec72d0f4c7148f04e994
2020-01-05 19:36:36 +00:00

59 lines
1.6 KiB
YAML

---
- when: update_containers|bool
block:
- name: ensure_pip on py2 systems
when: ansible_python.version.major == 2
block:
- command: "{{ python_cmd }} -m pip --version"
register: have_pip
changed_when: false
failed_when: false
- when: have_pip.rc != 0
become: true
block:
- name: check if python setup tool is installed
shell: "{{ python_cmd }} -m easy_install --version"
register: easy_install_exists
changed_when: false
failed_when: false
- name: Install python setuptools (easy_install)
when: easy_install_exists.rc != 0
# noqa 403
package:
state: latest
name:
- python2-setuptools
# python2-setuptools deprecates python-setuptools the former
# one being too old to be usable. included in openstack distro.
- name: easy-install pip
command: "{{ python_cmd }} -m easy_install pip"
- name: Update pip
# noqa 403
pip:
name: pip
state: latest
extra_args: --upgrade
become: true
- name: Pip install container-check
# noqa 403
pip:
name: container-check
state: latest
extra_args: --upgrade
become: true
- name: Prepare for the containerized deployment
shell: >
set -o pipefail &&
{{ working_dir }}/{{ overcloud_prep_containers_script }} 2>&1 {{ timestamper_cmd }} >
{{ overcloud_prep_containers_log }}
when: containerized_overcloud|bool