deep_scrub_choked
This commit is contained in:
@@ -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:
|
||||
- 'all'
|
||||
galaxy_tags:
|
||||
- system
|
||||
dependencies: []
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
- name: Include pre_requisites/prerequisites.yml
|
||||
ansible.builtin.include_tasks: pre_requisites/prerequisites.yml
|
||||
when: not is_atomic | bool
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
- name: Uninstall old docker versions
|
||||
ansible.builtin.package:
|
||||
name: ['docker', 'docker-engine', 'docker.io', 'containerd', 'runc']
|
||||
state: absent
|
||||
when: container_package_name == 'docker-ce'
|
||||
|
||||
- name: Allow apt to use a repository over https (debian)
|
||||
ansible.builtin.package:
|
||||
name: ['apt-transport-https', 'ca-certificates', 'gnupg', 'software-properties-common']
|
||||
update_cache: true
|
||||
register: result
|
||||
until: result is succeeded
|
||||
|
||||
- name: Add docker's gpg key
|
||||
ansible.builtin.apt_key:
|
||||
url: "https://download.docker.com/linux/{{ ansible_facts['distribution'] | lower }}/gpg"
|
||||
register: result
|
||||
until: result is succeeded
|
||||
when: container_package_name == 'docker-ce'
|
||||
|
||||
- name: Add docker repository
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb https://download.docker.com/linux/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release'] }} stable"
|
||||
when: container_package_name == 'docker-ce'
|
||||
|
||||
- name: Add podman ppa repository
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "ppa:projectatomic/ppa"
|
||||
when:
|
||||
- container_package_name == 'podman'
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
@@ -0,0 +1,77 @@
|
||||
---
|
||||
- name: Include specific variables
|
||||
ansible.builtin.include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_major_version'] }}.yml"
|
||||
- "{{ ansible_facts['os_family'] }}.yml"
|
||||
when: container_package_name is undefined and container_service_name is undefined
|
||||
|
||||
- name: Debian based systems tasks
|
||||
ansible.builtin.include_tasks: debian_prerequisites.yml
|
||||
when:
|
||||
- ansible_facts['os_family'] == 'Debian'
|
||||
tags: with_pkg
|
||||
|
||||
- name: Install container packages
|
||||
ansible.builtin.package:
|
||||
name: '{{ container_package_name }}'
|
||||
update_cache: true
|
||||
register: result
|
||||
until: result is succeeded
|
||||
tags: with_pkg
|
||||
|
||||
- name: Install lvm2 package
|
||||
ansible.builtin.package:
|
||||
name: lvm2
|
||||
register: result
|
||||
until: result is succeeded
|
||||
tags: with_pkg
|
||||
when: inventory_hostname in groups.get(osd_group_name, [])
|
||||
|
||||
- name: Extra configuration for docker
|
||||
when: container_service_name == 'docker'
|
||||
block:
|
||||
- name: Create the systemd docker override directory
|
||||
ansible.builtin.file:
|
||||
path: /etc/systemd/system/docker.service.d
|
||||
state: directory
|
||||
mode: "0755"
|
||||
when: ceph_docker_http_proxy is defined or ceph_docker_https_proxy is defined
|
||||
|
||||
- name: Create the systemd docker override file
|
||||
ansible.builtin.template:
|
||||
src: docker-proxy.conf.j2
|
||||
dest: /etc/systemd/system/docker.service.d/proxy.conf
|
||||
mode: "0600"
|
||||
owner: root
|
||||
group: root
|
||||
register: proxy_created
|
||||
when: ceph_docker_http_proxy is defined or ceph_docker_https_proxy is defined
|
||||
|
||||
- name: Remove docker proxy configuration
|
||||
ansible.builtin.file:
|
||||
path: /etc/systemd/system/docker.service.d/proxy.conf
|
||||
state: absent
|
||||
register: proxy_removed
|
||||
when:
|
||||
- ceph_docker_http_proxy is not defined
|
||||
- ceph_docker_https_proxy is not defined
|
||||
|
||||
# using xxx.changed here instead of an ansible handler because we need to
|
||||
# have an immediate effect and not wait the end of the play.
|
||||
# using flush_handlers via the meta action plugin isn't enough too because
|
||||
# it flushes all handlers and not only the one notified in this role.
|
||||
- name: Restart docker
|
||||
ansible.builtin.systemd:
|
||||
name: "{{ container_service_name }}"
|
||||
state: restarted
|
||||
daemon_reload: true
|
||||
when: proxy_created.changed | bool or proxy_removed.changed | bool
|
||||
|
||||
- name: Start container service
|
||||
ansible.builtin.service:
|
||||
name: '{{ container_service_name }}'
|
||||
state: started
|
||||
enabled: true
|
||||
tags:
|
||||
with_pkg
|
||||
@@ -0,0 +1,8 @@
|
||||
[Service]
|
||||
{% if ceph_docker_http_proxy is defined %}
|
||||
Environment="HTTP_PROXY={{ ceph_docker_http_proxy }}"
|
||||
{% endif %}
|
||||
{% if ceph_docker_https_proxy is defined %}
|
||||
Environment="HTTPS_PROXY={{ ceph_docker_https_proxy }}"
|
||||
{% endif %}
|
||||
Environment="NO_PROXY={{ ceph_docker_no_proxy }}"
|
||||
@@ -0,0 +1 @@
|
||||
RedHat-8.yml
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
container_package_name: podman
|
||||
container_service_name: podman
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
container_package_name: docker-ce
|
||||
container_service_name: docker
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
container_package_name: podman
|
||||
container_service_name: podman
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
container_package_name: docker
|
||||
container_service_name: docker
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
container_package_name: docker.io
|
||||
container_service_name: docker
|
||||
Reference in New Issue
Block a user