mirror of https://github.com/ceph/ceph-ansible.git
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
---
|
|
- 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' |