48 lines
1.7 KiB
YAML
48 lines
1.7 KiB
YAML
---
|
|
|
|
- name: Install nfs-common
|
|
apt: name=nfs-common state=latest
|
|
|
|
- name: change NEED_GSSD to NEED_GSSD=1
|
|
lineinfile: dest=/etc/default/nfs-common
|
|
state=present
|
|
backrefs=yes
|
|
regexp='^NEED_GSSD=$'
|
|
line='NEED_GSSD=1'
|
|
|
|
- name: change NEED_STATD to NEED_STATD=1
|
|
lineinfile: dest=/etc/default/nfs-common
|
|
state=present
|
|
backrefs=yes
|
|
regexp='^NEED_STATD=$'
|
|
line='NEED_STATD=1'
|
|
when: ansible_distribution == 'Debian'
|
|
|
|
- name: restart and enable rpc-gssd
|
|
service: name=rpc-gssd state=restarted enabled=yes
|
|
when: ansible_distribution == 'Ubuntu'
|
|
|
|
- name: restart and enable nfs-common
|
|
service: name=nfs-common state=restarted enabled=yes
|
|
when: ansible_distribution == 'Debian'
|
|
|
|
- name: ensure mountpoints exist
|
|
file: path={{ item }} state=directory
|
|
with_items:
|
|
- /users
|
|
- /u
|
|
# - /music
|
|
# - /scratch
|
|
|
|
#- name: Add fstab entry for users
|
|
# mount: src="aspartame:/users" name=/users fstype=nfs opts="noauto,bg,vers=3,sec=krb5p,nosuid,nodev,x-systemd.automount,x-systemd.requires=nfs-common.service" dump=0 passno=0 state=mounted
|
|
|
|
#- name: Add fstab entry for users (new netapp)
|
|
# mount: src="fs00:/users" name=/u fstype=nfs opts="noauto,bg,vers=3,sec=sys,nosuid,nodev,x-systemd.automount,x-systemd.requires=nfs-common.service" dump=0 passno=0 state=mounted
|
|
|
|
#- name: Add fstab entry for music
|
|
# mount: src="aspartame:/music" name=/music fstype=nfs opts="bg,vers=3,sec=sys,nolock,noatime,nosuid,nodev" dump=0 passno=0 state=mounted
|
|
|
|
#- name: Add fstab entry for scratch
|
|
# mount: src="corn-syrup:/scratch" name=/scratch fstype=nfs opts="bg,vers=3,sec=sys,noatime,nosuid,nodev" dump=0 passno=0 state=mounted
|