CSC Ansible Playbooks
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-playbooks/roles/nfs/tasks/main.yml

31 lines
1000 B

---
- 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: restart and enable rpc-gssd
service: name=rpc-gssd state=started enabled=yes
- name: ensure mountpoints exist
file: path={{ item }} state=directory
with_items:
- /users
- /music
- /scratch
- name: Add fstab entry for users
mount: src="aspartame:/users" name=/users fstype=nfs opts="bg,vers=3,sec=krb5p,nosuid,nodev" 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