ceph-ansible/roles/ceph-container-common/tasks/pre_requisites/prerequisites.yml

57 lines
1.3 KiB
YAML

---
- name: include specific variables
include_vars: "{{ item }}"
with_first_found:
- "{{ 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:
- ansible_os_family == 'Debian'
- container_package_name == 'docker-ce'
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_docker_enable_centos_extra_repo
tags:
with_pkg
- name: install container package
package:
name: ['{{ container_package_name }}', '{{ container_binding_name }}']
update_cache: true
tags:
with_pkg
- name: start container service
service:
name: '{{ container_service_name }}'
state: started
enabled: yes
tags:
with_pkg
when: not (ansible_os_family == 'RedHat' and
ansible_distribution_major_version == '8')
- 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