123456789101112131415161718192021222324252627282930 |
- ---
- - name: setup firewall
- import_tasks: firewall.yml
- - name: Install nfs-utils
- package: name=nfs-utils state=present
- register: result
- until: result | success
- - name: Configure NFS
- lineinfile:
- dest: /etc/sysconfig/nfs
- regexp: '^RPCNFSDARGS=.*$'
- line: 'RPCNFSDARGS="-N 2 -N 3"'
- register: nfs_config
- - name: Restart nfs-config
- systemd: name=nfs-config state=restarted
- when: nfs_config | changed
- - name: Ensure exports directory exists
- file:
- path: "{{ l_nfs_base_dir }}"
- state: directory
- - name: Enable and start NFS services
- systemd:
- name: nfs-server
- state: started
- enabled: yes
|