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

50 lines
1.1 KiB
YAML
Raw Normal View History

---
- name: include specific variables
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
- "{{ ansible_os_family }}.yml"
- name: debian based systems tasks
include_tasks: debian_prerequisites.yml
when:
- ansible_os_family == 'Debian'
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 | bool
tags:
with_pkg
- name: install container packages
package:
name: ['{{ container_package_name }}', '{{ container_binding_name }}']
update_cache: true
register: result
until: result is succeeded
tags: with_pkg
- name: install lvm2 package
package:
name: lvm2
register: result
until: result is succeeded
tags: with_pkg
when: inventory_hostname in groups.get(osd_group_name, [])
- name: start container service
service:
name: '{{ container_service_name }}'
state: started
enabled: yes
tags:
with_pkg
when: container_service_name == 'docker'