when: ceph_health.rc != 0
- include: pre_requisite.yml
+- include: selinux.yml
+ when: ansible_os_family == 'RedHat'
+
- include: fetch_configs.yml
- include: start_docker_mds.yml
--- /dev/null
+---
+- name: check if selinux is enabled
+ command: getenforce
+ register: sestatus
+ changed_when: false
+
+- name: set selinux permissions
+ shell: chcon -Rt svirt_sandbox_file_t {{ item }}
+ with_items:
+ - /etc/ceph
+ - /var/lib/ceph
+ changed_when: false
+ when: sestatus.stdout != 'Disabled'
when: ceph_health.rc != 0
- include: pre_requisite.yml
+- include: selinux.yml
+ when: ansible_os_family == 'RedHat'
+
- include: fetch_configs.yml
- include: start_docker_monitor.yml
- include: copy_configs.yml
--- /dev/null
+---
+- name: check if selinux is enabled
+ command: getenforce
+ register: sestatus
+ changed_when: false
+
+- name: set selinux permissions
+ shell: chcon -Rt svirt_sandbox_file_t {{ item }}
+ with_items:
+ - /etc/ceph
+ - /var/lib/ceph
+ changed_when: false
+ when: sestatus.stdout != 'Disabled'
when: ceph_health.rc != 0
- include: pre_requisite.yml
+- include: selinux.yml
+ when: ansible_os_family == 'RedHat'
+
- include: fetch_configs.yml
- include: start_docker_osd.yml
--- /dev/null
+---
+- name: check if selinux is enabled
+ command: getenforce
+ register: sestatus
+ changed_when: false
+
+- name: set selinux permissions
+ shell: chcon -Rt svirt_sandbox_file_t {{ item }}
+ with_items:
+ - /etc/ceph
+ - /var/lib/ceph
+ changed_when: false
+ when: sestatus.stdout != 'Disabled'
when: ceph_health.rc != 0
- include: pre_requisite.yml
+- include: selinux.yml
+ when: ansible_os_family == 'RedHat'
+
- include: fetch_configs.yml
- include: start_docker_rgw.yml
--- /dev/null
+---
+- name: check if selinux is enabled
+ command: getenforce
+ register: sestatus
+ changed_when: false
+
+- name: set selinux permissions
+ shell: chcon -Rt svirt_sandbox_file_t {{ item }}
+ with_items:
+ - /etc/ceph
+ - /var/lib/ceph
+ changed_when: false
+ when: sestatus.stdout != 'Disabled'