--- # install nfs_server - name: "install" ansible.builtin.import_tasks: "install.yaml" # configure nfs mount - name: "mounts" ansible.builtin.include_tasks: "config.yaml" loop: "{{ nfs_mount }}" loop_control: loop_var: "__nfs_mount" when: "nfs_mount is defined"