---
- include_tasks: utils/once/flag.yml
- name: "π Resolve the NFS server backend flavor"
ansible.builtin.set_fact:
SVC_STORAGE_NFS_SERVER_FLAVOR: "{{ lookup('nfs_flavor') }}"
- name: "β
Assert the NFS server flavor is kernel or ganesha"
ansible.builtin.assert:
that:
- SVC_STORAGE_NFS_SERVER_FLAVOR in ['kernel', 'ganesha']
fail_msg: "services.nfs-server.flavor must be 'kernel' or 'ganesha' (got '{{ SVC_STORAGE_NFS_SERVER_FLAVOR }}')"
- name: "π Include shared NFS export preparation"
ansible.builtin.include_tasks: 01_prepare.yml
- name: "π€ Dispatch NFS backend flavor"
ansible.builtin.include_tasks: "flavor/{{ SVC_STORAGE_NFS_SERVER_FLAVOR }}/main.yml"
- name: "π Include controller-side mount step"
ansible.builtin.include_tasks:
file: 03_controller_mount.yml
apply:
delegate_to: localhost # nocheck: localhost-become mounting the export on the controller needs root
run_once: true
become: true