Commit d7c20d78 authored by Lars Beckers's avatar Lars Beckers
Browse files

add basic nfs-client role

parent 7d95e25c
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
#/misc /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
# options are explicitly given.
#
#/net -hosts
/net /etc/auto.nfs
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
#!/bin/bash
if [ ! -h /$1 ]; then
rm /$1
rmdir /$1
ln -s /net/$1 /$1
fi
---
# file: roles/nfs-client/handlers/main.yml
- name: restart autofs
service: name=autofs state=restarted
---
# file: roles/nfs-client/tasks/main.yml
- name: ensure nfs client utils are installed
apt: name=nfs-common state=latest
tags: nfs-client packages
- name: ensure CIFS utils are installed
apt: name=cifs-utils,smbclient state=latest
tags: cifs-client packages
# makes life much easier to have an automounter and not /etc/fstab
- name: ensure automounter is installed
apt: name=autofs state=latest
tags: autofs packages
- name: ensure automounter is configured
copy: src=auto.master dest=/etc/auto.master owner=root group=root mode=0644
notify:
- restart autofs
tags: autofs config
- name: ensure mounts from central storage are available
template: src=auto.nfs.j2 dest=/etc/auto.nfs owner=root group=root mode=0644
notify:
- restart autofs
tags: autofs config
- name: ensure linking of home
script: create_netdir.sh home
tags: fsmpi
- name: ensure linking of pub
script: create_netdir.sh pub
tags: fsmpi
## TODO
home -fstype=nfs,noatime,hard,intr,nodev,nosuid,vers=3 rumo.fsmpi.rwth-aachen.de:/DATA/home
pub -fstype=nfs,noatime,hard,intr,nodev,nosuid,vers=3 rumo.fsmpi.rwth-aachen.de:/DATA/pub
eschrank -fstype=nfs,noatime,hard,intr,nodev,nosuid,vers=3 schrank.fsmpi.rwth-aachen.de:/srv/eschrank
#sharing -fstype=nfs,noatime,hard,intr,nodev,nosuid,vers=3 portal.fsmpi.rwth-aachen.de:/srv/sharing
videoag -fstype=nfs,noatime,hard,intr,nodev,nosuid,vers=3 videoag.fsmpi.rwth-aachen.de:/srv/videoag
videoag_raw -fstype=nfs,noatime,hard,intr,nodev,nosuid,vers=3 videoag.fsmpi.rwth-aachen.de:/srv/videoag_raw
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment