00_core.ymlΒΆ

---
- 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