nfs.yml 591 B

1234567891011121314151617181920212223
  1. ---
  2. - name: Install NFS server
  3. package: name=nfs-utils state=present
  4. when: not openshift.common.is_containerized | bool
  5. - name: Start rpcbind on Fedora/Red Hat
  6. systemd:
  7. name: rpcbind
  8. state: started
  9. enabled: yes
  10. - name: Start nfs on Fedora/Red Hat
  11. systemd:
  12. name: nfs-server
  13. state: started
  14. enabled: yes
  15. - name: Export the directories
  16. lineinfile: dest=/etc/exports
  17. regexp="^{{ mount_dir }}/{{ item.name }} "
  18. line="{{ mount_dir }}/{{ item.name }} {{nfs_export_options}}"
  19. with_items: "{{ partition_pool }}"
  20. notify: restart nfs