openstack-helm-infra/roles/deploy-docker/tasks/deploy-ansible-docker-support.yaml
Pete Birley 39ab1c3b5d Gate: Improve centos support
This PS updates the CentOS Gate.

Change-Id: Ic29b9e5949fb3fb3433802f7933208f3cabfef72
2018-04-20 11:28:36 -05:00

58 lines
2.0 KiB
YAML

# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: ensuring SELinux is disabled on centos & fedora
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' or ansible_distribution == 'Fedora'
become: true
become_user: root
command: setenforce 0
ignore_errors: True
#NOTE(portdirect): See https://ask.openstack.org/en/question/110437/importerror-cannot-import-name-unrewindablebodyerror/
- name: fix docker removal issue with ansible's docker_container on centos
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
block:
- name: remove requests and urllib3 distro packages to fix docker removal issue with ansible's docker_container on centos
become: true
become_user: root
include_role:
name: deploy-package
tasks_from: dist
vars:
state: absent
packages:
rpm:
- python-urllib3
- python-requests
- name: restore requests and urllib3 distro packages to fix docker removal issue with ansible's docker_container on centos
become: true
become_user: root
include_role:
name: deploy-package
tasks_from: dist
vars:
state: present
packages:
rpm:
- python-urllib3
- python-requests
- name: Ensure docker python packages deployed
include_role:
name: deploy-package
tasks_from: pip
vars:
packages:
- docker-py