123456789101112131415161718192021 |
- ---
- - name: Install NFS server on Fedora/Red Hat
- yum: name=nfs-utils state=present
- when: ansible_pkg_mgr == "yum"
- - name: Install NFS server on Fedora/Red Hat
- dnf: name=nfs-utils state=present
- when: ansible_pkg_mgr == "dnf"
- - name: Start rpcbind on Fedora/Red Hat
- service: name=rpcbind state=started enabled=yes
- - name: Start nfs on Fedora/Red Hat
- service: name=nfs-server state=started enabled=yes
- - name: Export the directories
- lineinfile: dest=/etc/exports
- regexp="^{{ mount_dir }}/{{ item.name }} "
- line="{{ mount_dir }}/{{ item.name }} {{nfs_export_options}}"
- with_items: partition_pool
- notify: restart nfs
|