added nfs mounts for sci software tree
This commit is contained in:
parent
64e14ab313
commit
47bf2ec3b9
1
main.yml
1
main.yml
|
@ -5,3 +5,4 @@
|
|||
- ANTS-Framework.generic_motd
|
||||
- ANTS-Framework.linux_localusers
|
||||
- ANTS-Framework.linux_defaultsoftware
|
||||
- scientific-software
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
- src: ANTS-Framework.linux_adbinding
|
||||
- src: ANTS-Framework.linux_defaultsoftware
|
||||
- src: ANTS-Framework.linux_localusers
|
||||
- src: scientific-software
|
||||
|
||||
# macOS roles
|
||||
- src: ANTS-Framework.macos_munki_condition
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
its_ccm_linux_automount__mounts:
|
||||
- {mountpoint: '/unibas/lcs-software', file: 'auto.lcs-software', mode: '0644'}
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: restart autofs
|
||||
service:
|
||||
name: autofs
|
||||
enabled: yes
|
||||
state: restarted
|
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
- name: CentOS 7 - Installing autofs home and group dependencies
|
||||
yum:
|
||||
name: python-gssapi, python-dns, python-pip, python-virtualenv, autofs, tcl
|
||||
state: present
|
||||
|
||||
- name: Setting autofs timeout
|
||||
lineinfile:
|
||||
dest: /etc/autofs.conf
|
||||
regexp: '^timeout'
|
||||
line: 'timeout = 10'
|
||||
notify:
|
||||
- restart autofs
|
||||
|
||||
- name: Enabling Mounts in Auto Master
|
||||
lineinfile:
|
||||
dest: /etc/auto.master
|
||||
line: '{{ item.mountpoint }} /etc/{{ item.file }}'
|
||||
with_items: '{{ its_ccm_linux_automount__mounts }}'
|
||||
notify:
|
||||
- restart autofs
|
||||
|
||||
- name: Installing Auto mount files
|
||||
template:
|
||||
src: '{{ item.file }}.j2'
|
||||
dest: /etc/{{ item.file}}
|
||||
mode: '{{ item.mode }}'
|
||||
owner: root
|
||||
group: root
|
||||
with_items: '{{ its_ccm_linux_automount__mounts }}'
|
||||
notify:
|
||||
- restart autofs
|
||||
|
||||
- name: Installing Softwaretree Lmod environment
|
||||
template:
|
||||
src: lmod-modules.sh.j2
|
||||
dest: /etc/profile.d/lmod-modules.sh
|
||||
mode: '0755'
|
||||
owner: root
|
||||
group: root
|
|
@ -0,0 +1,2 @@
|
|||
modules -fstype=nfs,soft,intr,nfsvers=3 86.119.29.46:/lcs-software/{{ ansible_distribution | lower }}{{ ansible_distribution_major_version }}/generic/&
|
||||
software -fstype=nfs,soft,intr,nfsvers=3 86.119.29.46:/lcs-software/{{ ansible_distribution | lower }}{{ ansible_distribution_major_version }}/generic/&
|
|
@ -0,0 +1,18 @@
|
|||
shell=`/bin/basename \`/bin/ps -p $$ -ocomm=\``
|
||||
|
||||
MODULES_TOP_DIR="/unibas/lcs-software/modules"
|
||||
LMOD_DIR="/unibas/lcs-software/software/Lmod/5.9-GCC-4.8.4/lmod/lmod"
|
||||
|
||||
if [ -f $LMOD_DIR/init/$shell ]
|
||||
then
|
||||
|
||||
|
||||
export PATH=$LMOD_DIR/libexec:$PATH
|
||||
. $LMOD_DIR/init/$shell
|
||||
|
||||
for dir in `ls -1 $MODULES_TOP_DIR | egrep -v '^all$' `
|
||||
do
|
||||
export MODULEPATH="$MODULEPATH:$MODULES_TOP_DIR/$dir"
|
||||
done
|
||||
|
||||
fi
|
Loading…
Reference in New Issue