nfs_client.yml 457 B

1234567891011121314151617181920
  1. ---
  2. - name: Access an NFS export
  3. hosts: servera.lab.example.com
  4. become: true
  5. vars:
  6. shared_dir: /nfsshare
  7. mount_point: /datanfs
  8. tasks:
  9. - name: the nfs-utils package is installed
  10. yum:
  11. name: nfs-utils
  12. state: present
  13. - name: the NFS export is mounted and in /etc/fstab
  14. mount:
  15. path: "{{ mount_point }}"
  16. src: serverd.lab.example.com:{{ shared_dir }}
  17. state: mounted
  18. fstype: nfs