ceph-ansible/roles/ceph-nfs/tasks/main.yml

42 lines
1.2 KiB
YAML

---
- name: set_fact docker_exec_cmd
set_fact:
docker_exec_cmd: "docker exec ceph-nfs-{{ ceph_nfs_service_suffix | default(ansible_hostname) }}"
when:
- containerized_deployment
- name: include common.yml
include_tasks: common.yml
# global/common requirement
- name: stop nfs server service
systemd:
name: "{{ 'nfs-server' if ansible_os_family == 'RedHat' else 'nfsserver' if ansible_os_family == 'Suse' else 'nfs-kernel-server' if ansible_os_family == 'Debian' }}"
state: stopped
enabled: no
failed_when: false
- name: include pre_requisite_non_container.yml
include_tasks: pre_requisite_non_container.yml
when:
- not containerized_deployment
- name: include pre_requisite_container.yml
include_tasks: pre_requisite_container.yml
when:
- containerized_deployment
- name: include create_rgw_nfs_user.yml
import_tasks: create_rgw_nfs_user.yml
# NOTE (leseb): workaround for issues with ganesha and librgw
- name: include ganesha_selinux_fix.yml
import_tasks: ganesha_selinux_fix.yml
when:
- not containerized_deployment
- ansible_os_family == 'RedHat'
- ansible_distribution_version >= '7.4'
- name: include start_nfs.yml
import_tasks: start_nfs.yml