mirror of https://github.com/ceph/ceph-ansible.git
roles: introduce `ceph-container-engine` role
This commit splits the current `ceph-container-common` role. This introduces a new role `ceph-container-engine` which handles the tasks specific to the installation of containers tools (docker/podman). This is needed for the ceph-dashboard implementation for 2 main reasons: 1/ Since the ceph-dashboard stack is only containerized, we must install everything needed to run containers even in non containerized deployments. Splitting this role allows us to not have to call the full `ceph-container-common` role which would run a bunch of unneeded tasks that would have been skipped anyway. 2/ The current implementation would have required to run `ceph-container-common` on all ceph-clients nodes which would have been conflicting withpull/4034/head9d3517c670
(we don't want to run ceph-container-common on all client nodes, see mentioned commit for more details) Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com> (cherry picked from commit55420d6253
)
parent
27bd7df5cf
commit
16c6d530c6
|
@ -128,6 +128,9 @@
|
|||
- import_role:
|
||||
name: ceph-handler
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
|
||||
|
@ -199,6 +202,9 @@
|
|||
- import_role:
|
||||
name: ceph-handler
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
|
||||
|
@ -313,6 +319,9 @@
|
|||
- import_role:
|
||||
name: ceph-handler
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
|
||||
|
@ -393,6 +402,9 @@
|
|||
- import_role:
|
||||
name: ceph-handler
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
|
||||
|
@ -450,6 +462,9 @@
|
|||
- import_role:
|
||||
name: ceph-handler
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
|
||||
|
@ -509,6 +524,9 @@
|
|||
- import_role:
|
||||
name: ceph-handler
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
|
||||
|
@ -565,6 +583,9 @@
|
|||
- import_role:
|
||||
name: ceph-handler
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Ansible role: ceph-docker
|
||||
# Ansible role: ceph-container-common
|
||||
|
||||
Documentation is available at http://docs.ceph.com/ceph-ansible/.
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
---
|
||||
- name: include pre_requisites/prerequisites.yml
|
||||
include_tasks: pre_requisites/prerequisites.yml
|
||||
- name: include prerequisites.yml
|
||||
include_tasks: prerequisites.yml
|
||||
when: not is_atomic
|
||||
|
||||
- name: get docker version
|
||||
command: docker --version
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
register: ceph_docker_version
|
||||
when: container_binary == 'docker'
|
||||
block:
|
||||
- name: get docker version
|
||||
command: docker --version
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
register: ceph_docker_version
|
||||
|
||||
- name: set_fact ceph_docker_version ceph_docker_version.stdout.split
|
||||
set_fact:
|
||||
ceph_docker_version: "{{ ceph_docker_version.stdout.split(' ')[2] }}"
|
||||
- name: set_fact ceph_docker_version ceph_docker_version.stdout.split
|
||||
set_fact:
|
||||
ceph_docker_version: "{{ ceph_docker_version.stdout.split(' ')[2] }}"
|
||||
when: container_binary == 'docker'
|
||||
|
||||
- name: include fetch_image.yml
|
||||
include_tasks: fetch_image.yml
|
||||
tags: fetch_container_image
|
||||
when: containerized_deployment
|
||||
|
||||
- name: get ceph version
|
||||
command: >
|
||||
|
@ -28,13 +28,10 @@
|
|||
changed_when: false
|
||||
check_mode: no
|
||||
register: ceph_version
|
||||
when: containerized_deployment
|
||||
|
||||
- name: set_fact ceph_version ceph_version.stdout.split
|
||||
set_fact:
|
||||
ceph_version: "{{ ceph_version.stdout.split(' ')[2] }}"
|
||||
when: containerized_deployment
|
||||
|
||||
- name: include release.yml
|
||||
include_tasks: release.yml
|
||||
when: containerized_deployment
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
- name: remove ceph udev rules
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- /usr/lib/udev/rules.d/95-ceph-osd.rules
|
||||
- /usr/lib/udev/rules.d/60-ceph-by-parttypeuuid.rules
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
- name: remove ceph udev rules
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- /usr/lib/udev/rules.d/95-ceph-osd.rules
|
||||
- /usr/lib/udev/rules.d/60-ceph-by-parttypeuuid.rules
|
||||
|
||||
- name: ensure tmpfiles.d is present
|
||||
lineinfile:
|
||||
path: /etc/tmpfiles.d/ceph-common.conf
|
||||
line: "d /run/ceph 0770 root root -"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
state: present
|
||||
create: yes
|
|
@ -0,0 +1,3 @@
|
|||
# Ansible role: ceph-container-engine
|
||||
|
||||
Documentation is available at http://docs.ceph.com/ceph-ansible/.
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
galaxy_info:
|
||||
company: Red Hat
|
||||
author: Guillaume Abrioux
|
||||
description: Handles container installation prerequisites
|
||||
license: Apache
|
||||
min_ansible_version: 2.7
|
||||
platforms:
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- xenial
|
||||
- name: EL
|
||||
versions:
|
||||
- 7
|
||||
galaxy_tags:
|
||||
- system
|
||||
dependencies: []
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- name: include pre_requisites/prerequisites.yml
|
||||
include_tasks: pre_requisites/prerequisites.yml
|
||||
when: not is_atomic
|
|
@ -5,9 +5,6 @@
|
|||
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
|
||||
- "{{ ansible_os_family }}.yml"
|
||||
|
||||
- name: include remove_ceph_udev_rules.yml
|
||||
include_tasks: remove_ceph_udev_rules.yml
|
||||
|
||||
- name: debian based systems tasks
|
||||
include_tasks: debian_prerequisites.yml
|
||||
when:
|
||||
|
@ -40,14 +37,4 @@
|
|||
enabled: yes
|
||||
tags:
|
||||
with_pkg
|
||||
when: container_service_name == 'docker'
|
||||
|
||||
- name: ensure tmpfiles.d is present
|
||||
lineinfile:
|
||||
path: /etc/tmpfiles.d/ceph-common.conf
|
||||
line: "d /run/ceph 0770 root root -"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
state: present
|
||||
create: yes
|
||||
when: container_service_name == 'docker'
|
|
@ -70,6 +70,8 @@
|
|||
name: ceph-infra
|
||||
- import_role:
|
||||
name: ceph-handler
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
tags: [with_pkg, fetch_container_image]
|
||||
|
@ -114,6 +116,8 @@
|
|||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-handler
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
- import_role:
|
||||
|
@ -161,6 +165,8 @@
|
|||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-handler
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
- import_role:
|
||||
|
@ -203,6 +209,8 @@
|
|||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-handler
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
- import_role:
|
||||
|
@ -245,6 +253,8 @@
|
|||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-handler
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
- import_role:
|
||||
|
@ -287,6 +297,8 @@
|
|||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-handler
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
- import_role:
|
||||
|
@ -329,6 +341,8 @@
|
|||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-handler
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
- import_role:
|
||||
|
@ -371,6 +385,8 @@
|
|||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-handler
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
- import_role:
|
||||
|
@ -413,6 +429,9 @@
|
|||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-handler
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
when: inventory_hostname == groups.get('clients', ['']) | first or dashboard_enabled
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
when: inventory_hostname == groups.get('clients', ['']) | first
|
||||
|
@ -458,6 +477,8 @@
|
|||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-handler
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
- import_role:
|
||||
|
@ -523,6 +544,8 @@
|
|||
tags: ['ceph_update_config']
|
||||
- import_role:
|
||||
name: ceph-handler
|
||||
- import_role:
|
||||
name: ceph-container-engine
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
- import_role:
|
||||
|
|
|
@ -498,7 +498,7 @@
|
|||
- import_role:
|
||||
name: ceph-handler
|
||||
- import_role:
|
||||
name: ceph-container-common
|
||||
name: ceph-container-engine
|
||||
- import_role:
|
||||
name: ceph-node-exporter
|
||||
when: dashboard_enabled
|
||||
|
|
Loading…
Reference in New Issue