The source files for this tutorial can be downloaded from its GitHub repository, or cloned into your current working directory using the command git clone https://github.com/ionos-cloud/module-ansible.git before changing into the module-ansible/docs/tutorials/05__introducing_roles sub-directory.
01__create_jumpbox_and_nlb.yml
---# ==============================================================================- name:About to execute tasks file for role 'nfs-server'ansible.builtin.meta:noop- name:Install and setup an NFS serveransible.builtin.package:name: - nfs-kernel-serverstate:present- name:Create the host-share directoryansible.builtin.file:path:"{{ export_root }}"state:directorymode:'1777'- name:Create entry in /etc/exportsansible.builtin.lineinfile:path:/etc/exportsline:"{{ export_root }} {{ export_specifier }}"- name:Copying the contents of {{ export_preload_path }} to nfs_server:/{{ export_root }}ansible.builtin.copy:src:"{{ export_preload_path }}"dest:"{{ export_root }}"when:export_preload_path | length > 0- name:Tell nfs-server to reload its configansible.builtin.service:name:nfs-serverstate:reloaded