]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
docker: Fix #1303 1328/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 21 Feb 2017 16:58:24 +0000 (17:58 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 3 Mar 2017 09:49:13 +0000 (10:49 +0100)
Install package from official repos rather than pip when using RHEL.

This commit fix https://bugzilla.redhat.com/show_bug.cgi?id=1420855

Also this commit Refact all `roles/ceph-*/tasks/docker/pre_requisite.yml`
to avoid a lot of duplicated code.

Fix: #1303
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
19 files changed:
roles/ceph-docker-common/defaults/main.yml
roles/ceph-docker-common/tasks/main.yml
roles/ceph-docker-common/tasks/pre_requisites/debian_prerequisites.yml [new file with mode: 0644]
roles/ceph-docker-common/tasks/pre_requisites/prerequisites.yml [new file with mode: 0644]
roles/ceph-mds/tasks/docker/main.yml
roles/ceph-mds/tasks/docker/pre_requisite.yml [deleted file]
roles/ceph-mon/defaults/main.yml
roles/ceph-mon/tasks/docker/main.yml
roles/ceph-mon/tasks/docker/pre_requisite.yml [deleted file]
roles/ceph-nfs/tasks/docker/main.yml
roles/ceph-nfs/tasks/docker/pre_requisite.yml [deleted file]
roles/ceph-osd/tasks/docker/main.yml
roles/ceph-osd/tasks/docker/pre_requisite.yml [deleted file]
roles/ceph-rbd-mirror/tasks/docker/main.yml
roles/ceph-rbd-mirror/tasks/docker/pre_requisite.yml [deleted file]
roles/ceph-restapi/tasks/docker/main.yml
roles/ceph-restapi/tasks/docker/pre_requisite.yml [deleted file]
roles/ceph-rgw/tasks/docker/main.yml
roles/ceph-rgw/tasks/docker/pre_requisite.yml [deleted file]

index adc21ceb1f2fe6d1c37e59e87d8af5e072b56487..66408683f2775bc7a0213958c20cafd9946bd612 100644 (file)
@@ -1,3 +1,4 @@
 ---
 
 ceph_docker_registry: docker.io
+ceph_mon_docker_enable_centos_extra_repo: false
index 14e987cde093783331de93bd28fef62cd3c830cc..7e63d3295a4e84108893fcdba6127c48f8954cac 100644 (file)
@@ -1,2 +1,15 @@
 ---
 - include: system_checks.yml
+
+
+- name: check if it is atomic host
+  stat: path=/run/ostree-booted
+  register: stat_ostree
+  always_run: true
+
+- name: set fact for using atomic host
+  set_fact:
+    is_atomic: '{{ stat_ostree.stat.exists }}'
+
+- include: ./pre_requisites/prerequisites.yml
+  when: not is_atomic
diff --git a/roles/ceph-docker-common/tasks/pre_requisites/debian_prerequisites.yml b/roles/ceph-docker-common/tasks/pre_requisites/debian_prerequisites.yml
new file mode 100644 (file)
index 0000000..effe2a3
--- /dev/null
@@ -0,0 +1,67 @@
+---
+# To install docker on debian
+- name: allow apt to use a repository over https (debian)
+  package:
+    name: "{{ item }}"
+    state: present
+    update_cache: yes
+  with_items:
+    - apt-transport-https
+    - ca-certificates
+    - curl
+    - software-properties-common
+  when: ansible_distribution == 'Debian'
+  tags:
+    with_pkg
+
+- name: add docker's gpg key
+  apt_key:
+    url: https://apt.dockerproject.org/gpg
+    state: present
+  when: ansible_distribution == 'Debian'
+
+- name: add docker and debian testing repository
+  apt_repository:
+    repo: "{{ item }}"
+    state: present
+  with_items:
+    - "deb https://apt.dockerproject.org/repo/ debian-{{ ansible_distribution_release }} main"
+    - "deb http://http.us.debian.org/debian/ testing contrib main"
+  when: ansible_distribution == 'Debian'
+
+- name: install pip from testing on debian
+  package:
+    name: python-pip
+    state: present
+    default_release: testing
+    update_cache: yes
+  when: ansible_distribution == 'Debian'
+  tags:
+    with_pkg
+
+- name: install docker-py via pip for debian
+  pip:
+    name: docker-py
+    state: latest
+  tags:
+    with_pkg
+  when: ansible_distribution == 'Debian'
+
+- name: install docker on debian
+  package:
+    name: docker-engine
+    state: present
+    update_cache: yes
+  when: ansible_distribution == 'Debian'
+  tags:
+    with_pkg
+
+# NOTE (jimcurtis): need at least version 1.9.0 of six or we get:
+# re:NameError: global name 'DEFAULT_DOCKER_API_VERSION' is not defined
+- name: install six via pip
+  pip:
+    name: six
+    version: 1.9.0
+  when: ansible_distribution == 'Debian'
+  tags:
+    with_pkg
diff --git a/roles/ceph-docker-common/tasks/pre_requisites/prerequisites.yml b/roles/ceph-docker-common/tasks/pre_requisites/prerequisites.yml
new file mode 100644 (file)
index 0000000..c337a6f
--- /dev/null
@@ -0,0 +1,80 @@
+---
+# Manage debian in a separate file because of specificities
+- include: debian_prerequisites.yml
+  when: ansible_distribution == 'Debian'
+
+- name: install docker on ubuntu
+  package:
+    name: docker.io
+    state: present
+    update_cache: yes
+  when: ansible_distribution == 'Ubuntu'
+  tags:
+    with_pkg
+
+# ensure extras enabled for docker
+- name: enable extras on centos
+  yum_repository:
+    name: extras
+    state: present
+    enabled: yes
+  when:
+    - ansible_distribution == 'CentOS'
+    - ceph_mon_docker_enable_centos_extra_repo
+  tags:
+    with_pkg
+
+- name: install python-six
+  package:
+    name: python-six
+    state: present
+    update_cache: yes
+  when: ansible_distribution != 'Debian'
+  tags:
+    with_pkg
+
+- name: install python-docker-py on red hat / centos
+  package:
+    name: python-docker-py
+    state: present
+  when: ansible_os_family == 'RedHat'
+  tags:
+    with_pkg
+
+- name: install python-docker on ubuntu
+  package:
+    name: python-docker
+    state: present
+  when: ansible_distribution == 'Ubuntu'
+  tags:
+    with_pkg
+
+- name: install docker on red hat / centos
+  package:
+    name: docker
+    state: present
+  when: ansible_os_family == 'RedHat'
+  tags:
+    with_pkg
+
+- name: pause after docker install before starting (on openstack vms)
+  pause: seconds=5
+  when: ceph_docker_on_openstack
+  tags:
+    with_pkg
+
+- name: start docker service
+  service:
+    name: docker
+    state: started
+    enabled: yes
+  tags:
+    with_pkg
+
+- name: install ntp
+  package:
+    name: ntp
+    state: present
+  when: ntp_service_enabled
+  tags:
+    with_pkg
index 507aadfa8c18d99cb9bec29b4e54999590e38a2f..75a954e219b61c463cb6c624abc7de938294907a 100644 (file)
@@ -6,23 +6,11 @@
   failed_when: false
   always_run: true
 
-- name: check if it is Atomic host
-  stat: path=/run/ostree-booted
-  register: stat_ostree
-  always_run: true
-
-- name: set fact for using Atomic host
-  set_fact:
-    is_atomic: '{{ stat_ostree.stat.exists }}'
-
 - include: checks.yml
   when:
     - ceph_health.rc != 0
     - not "{{ rolling_update | default(false) }}"
 
-- include: pre_requisite.yml
-  when: not is_atomic
-
 - include: "{{ playbook_dir }}/roles/ceph-common/tasks/misc/ntp_atomic.yml"
   when:
     - is_atomic
diff --git a/roles/ceph-mds/tasks/docker/pre_requisite.yml b/roles/ceph-mds/tasks/docker/pre_requisite.yml
deleted file mode 100644 (file)
index 24924e3..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
----
-- name: install pip and docker on ubuntu
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker
-    - docker.io
-  when: ansible_distribution == 'Ubuntu'
-  tags:
-    with_pkg
-
-- name: install pip and docker on debian
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker-engine
-  when: ansible_distribution == 'Debian'
-  tags:
-    with_pkg
-
-# install epel for pip
-- name: install epel on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - epel-release
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-
-- name: enable extras repo for centos
-  yum_repository:
-    name: extras
-    state: present
-    enabled: yes
-  when: ansible_distribution == 'CentOS'
-  tags:
-    with_pkg
-
-- name: install pip on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-
-- name: install docker-engine on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - docker-engine
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-
-# for CentOS
-- name: install docker on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - docker
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-  
-# docker package could be docker-enginer or docker  
-- name: install pip and docker on redhat
-  dnf:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-    - docker-engine
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "dnf"
-  tags:
-    with_pkg
-
-- name: start docker service
-  service:
-    name: docker
-    state: started
-    enabled: yes
-  tags:
-    with_pkg
-
-# NOTE (jimcurtis): need at least version 1.9.0 of six or we get:
-# re:NameError: global name 'DEFAULT_DOCKER_API_VERSION' is not defined
-- name: install six
-  pip:
-    name: six
-    version: 1.9.0
-  tags:
-    with_pkg
-
-# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
-- name: install docker-py
-  pip:
-    name: docker-py
-    version: 1.1.0
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '<')
-
-- name: install docker-py
-  pip:
-    name: docker-py
-    state: latest
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '>=')
-
-- name: install ntp
-  package:
-    name: ntp
-    state: present
-  when:
-    - ntp_service_enabled
-  tags:
-    with_pkg
index e6d102e54b8a6918f63f4cc1cb8dcab5858835bc..a9a837ec0faebd2f9860b3b2f83a5ceffd7b379d 100644 (file)
@@ -80,4 +80,3 @@ ceph_docker_on_openstack: false
 mon_docker_privileged: false
 mon_docker_net_host: true
 ceph_config_keys: [] # DON'T TOUCH ME
-ceph_mon_docker_enable_centos_extra_repo: false
index f1bc6dc11cea8b376849990bd9bee35c316dc5df..af0dc33a4b9ff67c24106e66067b6cb21c02af82 100644 (file)
@@ -6,24 +6,12 @@
   failed_when: false
   always_run: true
 
-- name: check if it is Atomic host
-  stat: path=/run/ostree-booted
-  register: stat_ostree
-  always_run: true
-
-- name: set fact for using Atomic host
-  set_fact:
-      is_atomic: '{{ stat_ostree.stat.exists }}'
-
 - include: checks.yml
   when:
     - ceph_health.rc != 0
     - not mon_containerized_deployment_with_kv
     - not "{{ rolling_update | default(false) }}"
 
-- include: pre_requisite.yml
-  when: not is_atomic
-
 - include: "{{ playbook_dir }}/roles/ceph-common/tasks/misc/ntp_atomic.yml"
   when:
     - is_atomic
diff --git a/roles/ceph-mon/tasks/docker/pre_requisite.yml b/roles/ceph-mon/tasks/docker/pre_requisite.yml
deleted file mode 100644 (file)
index 41f4b2b..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
----
-- name: install pip and docker on ubuntu
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker
-    - docker.io
-  when: ansible_distribution == 'Ubuntu'
-  tags:
-    with_pkg
-
-- name: install pip and docker on debian
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker-engine
-  when: ansible_distribution == 'Debian'
-  tags:
-    with_pkg
-
-# install epel for pip
-- name: install epel-release on redhat
-  yum:
-    name: epel-release
-    state: present
-  when: ansible_os_family == 'RedHat'
-  tags:
-    with_pkg
-
-# ensure extras enabled for docker
-- name: enable extras on centos
-  yum_repository:
-    name: extras
-    state: present
-    enabled: yes
-  when:
-    - ansible_distribution == 'CentOS'
-    - ceph_mon_docker_enable_centos_extra_repo
-  tags:
-    with_pkg
-
-- name: install pip on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-
-- name: install docker-engine on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - docker-engine
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-
-# for CentOS
-- name: install docker on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - docker
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-
-- name: install pip and docker on redhat (dnf)
-  dnf:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-    - docker-engine
-    - docker
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "dnf"
-  tags:
-    with_pkg
-
-
-# NOTE (jimcurtis): need at least version 1.9.0 of six or we get:
-# re:NameError: global name 'DEFAULT_DOCKER_API_VERSION' is not defined
-- name: install six
-  pip:
-    name: six
-    version: 1.9.0
-  tags:
-    with_pkg
-
-- name: pause after docker install before starting (on openstack vms)
-  pause: seconds=5
-  when: ceph_docker_on_openstack
-  tags:
-    with_pkg
-
-- name: start docker service
-  service:
-    name: docker
-    state: started
-    enabled: yes
-  tags:
-    with_pkg
-
-# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
-- name: install docker-py
-  pip:
-    name: docker-py
-    version: 1.1.0
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '<')
-
-- name: install docker-py
-  pip:
-    name: docker-py
-    state: latest
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '>=')
-
-- name: install ntp
-  package:
-    name: ntp
-    state: present
-  when:
-    - ntp_service_enabled
-  tags:
-    with_pkg
index d80a4c97509b0104d700fea08516cc507b4f3bf2..2bff17fa736918ee081fa1af1159e9d3f53ea736 100644 (file)
@@ -6,23 +6,11 @@
   failed_when: false
   always_run: true
 
-- name: check if it is Atomic host
-  stat: path=/run/ostree-booted
-  register: stat_ostree
-  always_run: true
-
-- name: set fact for using Atomic host
-  set_fact:
-      is_atomic: '{{ stat_ostree.stat.exists }}'
-
 - include: checks.yml
   when:
     ceph_health.rc != 0 and
     not mon_containerized_deployment_with_kv
 
-- include: pre_requisite.yml
-  when: not is_atomic
-
 - include: "{{ playbook_dir }}/roles/ceph-common/tasks/misc/ntp_atomic.yml"
   when:
     - is_atomic
diff --git a/roles/ceph-nfs/tasks/docker/pre_requisite.yml b/roles/ceph-nfs/tasks/docker/pre_requisite.yml
deleted file mode 100644 (file)
index 8b24c58..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
----
-- name: install pip and docker on ubuntu
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker
-    - docker.io
-  when: ansible_distribution == 'Ubuntu'
-  tags:
-    with_pkg
-
-- name: install pip and docker on debian
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker-engine
-  when: ansible_distribution == 'Debian'
-  tags:
-    with_pkg
-
-- name: enable extras repo for centos
-  yum_repository:
-    name: extras
-    state: present
-    enabled: yes
-  when: ansible_distribution == 'CentOS'
-  tags:
-    with_pkg
-
-- name: install pip and docker on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-    - docker-engine
-  when:
-    ansible_os_family == 'RedHat' and
-    ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-
-- name: install pip and docker on redhat
-  dnf:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-    - docker-engine
-  when:
-    ansible_os_family == 'RedHat' and
-    ansible_pkg_mgr == "dnf"
-  tags:
-    with_pkg
-
-- name: install epel-release on redhat
-  yum:
-    name: epel-release
-    state: present
-  when: ansible_os_family == 'RedHat'
-  tags:
-    with_pkg
-
-# NOTE (jimcurtis): need at least version 1.9.0 of six or we get:
-# re:NameError: global name 'DEFAULT_DOCKER_API_VERSION' is not defined
-- name: install six
-  pip:
-    name: six
-    version: 1.9.0
-  tags:
-    with_pkg
-
-# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
-- name: install docker-py
-  pip:
-    name: docker-py
-    version: 1.1.0
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '<')
-- name: install docker-py
-  pip:
-    name: docker-py
-    state: latest
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '>=')
-
-- name: pause after docker install before starting (on openstack vms)
-  pause: seconds=5
-  when: ceph_docker_on_openstack
-  tags:
-    with_pkg
-
-- name: start docker service
-  service:
-    name: docker
-    state: started
-    enabled: yes
-  tags:
-    with_pkg
-
-- name: install ntp
-  package:
-    name: ntp
-    state: present
-  when:
-    - ntp_service_enabled
-  tags:
-    with_pkg
index 9771bcd14926b3ac66148ae0cdc8554c98f4a2e5..23ecd54e3001e5f8499766351bc91e55ab67c3f2 100644 (file)
     - not osd_containerized_deployment_with_kv
     - not "{{ rolling_update | default(false) }}"
 
-- name: check if it is Atomic host
-  stat: path=/run/ostree-booted
-  register: stat_ostree
-  always_run: true
-
-- name: set fact for using Atomic host
-  set_fact:
-    is_atomic: '{{ stat_ostree.stat.exists }}'
-
-- include: pre_requisite.yml
-  when: not is_atomic
-
 - include: "{{ playbook_dir }}/roles/ceph-common/tasks/misc/ntp_atomic.yml"
   when:
     - is_atomic
diff --git a/roles/ceph-osd/tasks/docker/pre_requisite.yml b/roles/ceph-osd/tasks/docker/pre_requisite.yml
deleted file mode 100644 (file)
index 85a1047..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
----
-- name: install pip and docker on ubuntu
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker
-    - docker.io
-  when: ansible_distribution == 'Ubuntu'
-  tags:
-    with_pkg
-
-- name: install pip and docker on debian
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker-engine
-  when: ansible_distribution == 'Debian'
-  tags:
-    with_pkg
-
-- name: install epel-release on redhat
-  yum:
-    name: epel-release
-    state: present
-  when: ansible_os_family == 'RedHat'
-  tags:
-    with_pkg
-
-- name: install pip on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-
-- name: install docker-engine on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - docker-engine
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-
-# for CentOS
-- name: install docker on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - docker
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-
-- name: install pip and docker on redhat
-  dnf:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-    - docker-engine
-    - docker
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "dnf"
-  tags:
-    with_pkg
-
-
-# NOTE (jimcurtis): need at least version 1.9.0 of six or we get:
-# re:NameError: global name 'DEFAULT_DOCKER_API_VERSION' is not defined
-- name: install six
-  pip:
-    name: six
-    version: 1.9.0
-  tags:
-    with_pkg
-
-- name: pause after docker install before starting (on openstack vms)
-  pause: seconds=5
-  when: ceph_docker_on_openstack
-  tags:
-    with_pkg
-
-- name: start docker service
-  service:
-    name: docker
-    state: started
-    enabled: yes
-  tags:
-    with_pkg
-
-# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
-- name: install docker-py
-  pip:
-    name: docker-py
-    version: 1.1.0
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '<')
-
-- name: install docker-py
-  pip:
-    name: docker-py
-    state: latest
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '>=')
-
-- name: install ntp
-  package:
-    name: ntp
-    state: present
-  when:
-    - ntp_service_enabled
-  tags:
-    with_pkg
index 20da41b5c2b75235f0d28af705763c7a539c50d4..dbbc87eea4520ed8dd45aebff8b443015898747c 100644 (file)
@@ -6,21 +6,9 @@
   failed_when: false
   always_run: true
 
-- name: check if it is Atomic host
-  stat: path=/run/ostree-booted
-  always_run: true
-  register: stat_ostree
-
-- name: set fact for using Atomic host
-  set_fact:
-      is_atomic='{{ stat_ostree.stat.exists }}'
-
 - include: checks.yml
   when: ceph_health.rc != 0
 
-- include: pre_requisite.yml
-  when: not is_atomic
-
 - include: "{{ playbook_dir }}/roles/ceph-common/tasks/misc/ntp_atomic.yml"
   when:
     - is_atomic
diff --git a/roles/ceph-rbd-mirror/tasks/docker/pre_requisite.yml b/roles/ceph-rbd-mirror/tasks/docker/pre_requisite.yml
deleted file mode 100644 (file)
index edaeb67..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
----
-- name: install pip and docker on ubuntu
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker
-    - docker.io
-  when: ansible_distribution == 'Ubuntu'
-  tags:
-    with_pkg
-
-- name: install pip and docker on debian
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker-engine
-  when: ansible_distribution == 'Debian'
-  tags:
-    with_pkg
-
-# install epel for pip
-- name: install epel on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - epel-release
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-
-- name: enable extras repo for centos
-  yum_repository:
-    name: extras
-    state: present
-    enabled: yes
-  when: ansible_distribution == 'CentOS'
-  tags:
-    with_pkg
-
-- name: install pip on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-
-- name: install docker-engine on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - docker-engine
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-
-# for CentOS
-- name: install docker on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - docker
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-
-# docker package could be docker-enginer or docker
-- name: install pip and docker on redhat
-  dnf:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-    - docker-engine
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "dnf"
-  tags:
-    with_pkg
-
-- name: start docker service
-  service:
-    name: docker
-    state: started
-    enabled: yes
-  tags:
-    with_pkg
-
-# NOTE (jimcurtis): need at least version 1.9.0 of six or we get:
-# re:NameError: global name 'DEFAULT_DOCKER_API_VERSION' is not defined
-- name: install six
-  pip:
-    name: six
-    version: 1.9.0
-  tags:
-    with_pkg
-
-# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
-- name: install docker-py
-  pip:
-    name: docker-py
-    version: 1.1.0
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '<')
-
-- name: install docker-py
-  pip:
-    name: docker-py
-    state: latest
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '>=')
-
-- name: install ntp
-  package:
-    name: ntp
-    state: present
-  when:
-    - ntp_service_enabled
-  tags:
-    with_pkg
index 22e7a5f638d99c1cd383794ddd816cb75df82fb5..c0143f9cc5083ae65a7bf0e2f6b78eb3e36114f9 100644 (file)
@@ -1,16 +1,4 @@
 ---
-- name: check if it is Atomic host
-  stat: path=/run/ostree-booted
-  register: stat_ostree
-  always_run: true
-
-- name: set fact for using Atomic host
-  set_fact:
-      is_atomic: '{{ stat_ostree.stat.exists }}'
-
-- include: pre_requisite.yml
-  when: not is_atomic
-
 - include: "{{ playbook_dir }}/roles/ceph-common/tasks/misc/ntp_atomic.yml"
   when:
     - is_atomic
diff --git a/roles/ceph-restapi/tasks/docker/pre_requisite.yml b/roles/ceph-restapi/tasks/docker/pre_requisite.yml
deleted file mode 100644 (file)
index c6ebb9e..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
----
-- name: install pip and docker on ubuntu
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker
-    - docker.io
-  when: ansible_distribution == 'Ubuntu'
-  tags:
-    with_pkg
-
-- name: install pip and docker on debian
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker-engine
-  when: ansible_distribution == 'Debian'
-  tags:
-    with_pkg
-
-- name: install epel-release on redhat
-  yum:
-    name: epel-release
-    state: present
-  when: ansible_os_family == 'RedHat'
-  tags:
-    with_pkg
-
-- name: enable extras repo on centos
-  yum_repository:
-    name: extras
-    state: present
-    enabled: yes
-  when: ansible_distribution == 'CentOS'
-  tags:
-    with_pkg
-
-- name: install pip on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-
-- name: install docker-engine on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - docker-engine
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-
-# for CentOS
-- name: install docker on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - docker
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-- name: install pip and docker on redhat
-  dnf:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-    - docker-engine
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "dnf"
-  tags:
-    with_pkg
-
-# NOTE (jimcurtis): need at least version 1.9.0 of six or we get:
-# re:NameError: global name 'DEFAULT_DOCKER_API_VERSION' is not defined
-- name: install six
-  pip:
-    name: six
-    version: 1.9.0
-  tags:
-    with_pkg
-
-# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
-- name: install docker-py
-  pip:
-    name: docker-py
-    version: 1.1.0
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '<')
-- name: install docker-py
-  pip:
-    name: docker-py
-    state: latest
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '>=')
-
-- name: pause after docker install before starting (on openstack vms)
-  pause: seconds=5
-  when: ceph_docker_on_openstack
-  tags:
-    with_pkg
-
-- name: start docker service
-  service:
-    name: docker
-    state: started
-    enabled: yes
-  tags:
-    with_pkg
-
-- name: install ntp
-  package:
-    name: ntp
-    state: present
-  when:
-    - ntp_service_enabled
-  tags:
-    with_pkg
index f3b9b4ebe9b57160c08d3ddc55ca55528ad46468..5779e805edb6d2cd9cc5749c7b022c4f364bdd06 100644 (file)
@@ -6,23 +6,11 @@
   failed_when: false
   always_run: true
 
-- name: check if it is Atomic host
-  stat: path=/run/ostree-booted
-  always_run: true
-  register: stat_ostree
-
-- name: set fact for using Atomic host
-  set_fact:
-    is_atomic: '{{ stat_ostree.stat.exists }}'
-
 - include: checks.yml
   when:
     - ceph_health.rc != 0
     - not "{{ rolling_update | default(false) }}"
 
-- include: pre_requisite.yml
-  when: not is_atomic
-
 - include: "{{ playbook_dir }}/roles/ceph-common/tasks/misc/ntp_atomic.yml"
   when:
     - is_atomic
diff --git a/roles/ceph-rgw/tasks/docker/pre_requisite.yml b/roles/ceph-rgw/tasks/docker/pre_requisite.yml
deleted file mode 100644 (file)
index e66c0f4..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
----
-- name: install pip and docker on ubuntu
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker
-    - docker.io
-  when: ansible_distribution == 'Ubuntu'
-  tags:
-    with_pkg
-
-- name: install pip and docker on debian
-  apt:
-    name: "{{ item }}"
-    state: present
-    update_cache: yes
-  with_items:
-    - python-pip
-    - docker-engine
-  when: ansible_distribution == 'Debian'
-  tags:
-    with_pkg
-
-- name: install epel-release on redhat
-  yum:
-    name: epel-release
-    state: present
-  when: ansible_os_family == 'RedHat'
-  tags:
-    with_pkg
-    
-- name: enable extras repo on centos
-  yum_repository:
-    name: extras
-    state: present
-    enabled: yes
-  when: ansible_distribution == 'CentOS'
-  tags:
-    with_pkg
-
-- name: install pip on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - python-pip
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-
-- name: install docker-engine on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - docker-engine
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-
-# for CentOS
-- name: install docker on redhat
-  yum:
-    name: "{{ item }}"
-    state: present
-  with_items:
-    - docker
-  when:
-    - ansible_os_family == 'RedHat'
-    - ansible_pkg_mgr == "yum"
-  tags:
-    with_pkg
-  failed_when: false
-
-# NOTE (jimcurtis): need at least version 1.9.0 of six or we get:
-# re:NameError: global name 'DEFAULT_DOCKER_API_VERSION' is not defined
-- name: install six
-  pip:
-    name: six
-    version: 1.9.0
-  tags:
-    with_pkg
-
-# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
-- name: install docker-py
-  pip:
-    name: docker-py
-    version: 1.1.0
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '<')
-- name: install docker-py
-  pip:
-    name: docker-py
-    state: latest
-  tags:
-    with_pkg
-  when: ansible_version['full'] | version_compare('2.1.0.0', '>=')
-
-- name: pause after docker install before starting (on openstack vms)
-  pause: seconds=5
-  when: ceph_docker_on_openstack
-  tags:
-    with_pkg
-
-- name: start docker service
-  service:
-    name: docker
-    state: started
-    enabled: yes
-  tags:
-    with_pkg
-
-- name: install ntp
-  package:
-    name: ntp
-    state: present
-  when:
-    - ntp_service_enabled
-  tags:
-    with_pkg