parent
252a4e7b6d
commit
43e1d25be2
@ -0,0 +1,7 @@ |
||||
--- |
||||
|
||||
- name: Restart GSSD |
||||
service: |
||||
name: rpc-gssd |
||||
state: restarted |
||||
enabled: true |
@ -0,0 +1,101 @@ |
||||
--- |
||||
|
||||
- name: Install nfs utilities |
||||
apt: |
||||
name: nfs-common |
||||
cache_valid_time: 3600 |
||||
|
||||
- name: Enable GSSD |
||||
lineinfile: |
||||
dest: /etc/default/nfs-common |
||||
state: present |
||||
backrefs: true |
||||
regexp: ^NEED_GSSD=$ |
||||
line: NEED_GSSD=1 |
||||
notify: |
||||
- Restart GSSD |
||||
|
||||
- name: Ensure mountpoints exist |
||||
file: |
||||
path: '{{ item }}' |
||||
state: directory |
||||
with_items: |
||||
- /users |
||||
- /u |
||||
- /scratch |
||||
|
||||
- name: Ensure music mountpoint exist |
||||
when: mount_music is defined |
||||
file: |
||||
path: /music |
||||
state: directory |
||||
|
||||
- name: Mount home directories (sec=sys) |
||||
when: mount_home_sys is defined and not(ansible_virtualization_role == 'guest' and ansible_virtualization_type == 'lxc') |
||||
mount: |
||||
src: '{{ item.src }}' |
||||
name: '{{ item.name }}' |
||||
fstype: nfs |
||||
opts: bg,vers=3,sec=sys,nosuid,nodev |
||||
dump: 0 |
||||
passno: 0 |
||||
state: mounted |
||||
with_items: |
||||
- src: aspartame.csclub.uwaterloo.ca:/users |
||||
name: /users |
||||
- src: fs00.csclub.uwaterloo.ca:/users |
||||
name: /u |
||||
ignore_errors: true |
||||
|
||||
- name: Mount home directories (sec=krb5p) |
||||
when: mount_home_sys is not defined and not(ansible_virtualization_role == 'guest' and ansible_virtualization_type == 'lxc') |
||||
mount: |
||||
src: '{{ item.src }}' |
||||
name: '{{ item.name }}' |
||||
fstype: nfs |
||||
opts: bg,vers=3,sec=krb5p,nosuid,nodev |
||||
dump: 0 |
||||
passno: 0 |
||||
state: mounted |
||||
with_items: |
||||
- src: aspartame.csclub.uwaterloo.ca:/users |
||||
name: /users |
||||
- src: fs00.csclub.uwaterloo.ca:/users |
||||
name: /u |
||||
ignore_errors: true |
||||
|
||||
- name: Mount scratch |
||||
when: not(ansible_virtualization_role == 'guest' and ansible_virtualization_type == 'lxc') |
||||
mount: |
||||
src: corn-syrup.csclub.uwaterloo.ca:/scratch |
||||
name: /scratch |
||||
fstype: nfs |
||||
opts: bg,vers=3,sec=sys,nosuid,nodev |
||||
dump: 0 |
||||
passno: 0 |
||||
state: mounted |
||||
ignore_errors: true |
||||
|
||||
- name: Mount music (sec=sys) |
||||
when: mount_music is defined and mount_music_sys is defined and not(ansible_virtualization_role == 'guest' and ansible_virtualization_type == 'lxc') |
||||
mount: |
||||
src: corn-syrup.csclub.uwaterloo.ca:/scratch |
||||
name: /scratch |
||||
fstype: nfs |
||||
opts: bg,vers=3,sec=sys,nosuid,nodev |
||||
dump: 0 |
||||
passno: 0 |
||||
state: mounted |
||||
ignore_errors: true |
||||
|
||||
- name: Mount music (sec=krb5p) |
||||
when: mount_music is define and mount_music_sys is not defined and not(ansible_virtualization_role == 'guest' and ansible_virtualization_type == 'lxc') |
||||
mount: |
||||
src: corn-syrup.csclub.uwaterloo.ca:/scratch |
||||
name: /scratch |
||||
fstype: nfs |
||||
opts: bg,vers=3,sec=sys,nosuid,nodev |
||||
dump: 0 |
||||
passno: 0 |
||||
state: mounted |
||||
ignore_errors: true |
Loading…
Reference in new issue