nfs_client.yml 472 B

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