Skip to content
Snippets Groups Projects
Commit 584786ab authored by Chris Hines's avatar Chris Hines
Browse files

roles to install lmod (lua modules) and link usr/local to the volume on the managment node

parent 8a0e913e
No related branches found
No related tags found
No related merge requests found
---
- include_vars: "{{ ansible_os_family }}.yml"
- name: install lua
yum: name={{ item }} state=installed
with_items:
- lua
- lua-filesystem
- lua-posix
sudo: true
when: ansible_os_family == 'RedHat'
- name: install lua
apt: name={{ item }} state=installed
with_items:
- lua5.2
- lua5.2
- lua-filesystem
- lua-bitop
- lua-posix
- liblua5.2-0
- liblua5.2-dev
- tcl
sudo: true
when: ansible_os_family == 'Debian'
- name: link bash
file: src={{ soft_dir }}/lmod/lmod/init/bash dest=/etc/profile.d/lmod.sh state=link
sudo: true
- name: link csh
file: src={{ soft_dir }}/lmod/lmod/init/cshrc dest=/etc/profile.d/lmod.csh state=link
sudo: true
---
lua_include: /usr/include/lua5.2
---
lua_include: /usr/local
---
source_dir: /tmp
soft_dir: /usr/local
lmod_version: 5.8.6
---
- name: stat usrlocal
stat: path={{ dest }}
register: stat_usrlocal
- name: mv
command: mv /usr/local /usr/local_old
when: stat_usrlocal.stat.isdir == True
sudo: true
- name: link
file: src="{{ src }}" dest="{{ dest }}" state=link
sudo: true
---
- include_vars: "{{ ansible_os_family }}.yml"
- name: install lua
yum: name={{ item }} state=installed
with_items:
- lua
- lua-filesystem
- lua-posix
sudo: true
when: ansible_os_family == 'RedHat'
- name: install lua
apt: name={{ item }} state=installed
with_items:
- lua5.2
- lua5.2
- lua-filesystem
- lua-bitop
- lua-posix
- liblua5.2-0
- liblua5.2-dev
- tcl
sudo: true
when: ansible_os_family == 'Debian'
- name: Download LMOD
get_url:
url=http://downloads.sourceforge.net/project/lmod/Lmod-{{ lmod_version }}.tar.bz2
dest={{source_dir}}/Lmod-{{ lmod_version }}.tar.bz2
mode=0444
- name: Uncompress LMOD
unarchive:
src={{ source_dir }}/Lmod-{{ lmod_version }}.tar.bz2
dest={{ source_dir }}
copy=no
creates={{source_dir}}/Lmod-{{ lmod_version }}/README
- name: Compile and install Lmod
shell: cd {{ source_dir }}/Lmod-{{ lmod_version }}; ./configure --prefix={{ soft_dir }} --with-mpathSearch=YES --with-caseIndependentSorting=YES && make install LUA_INCLUDE={{ lua_include }}
args:
creates: "{{ soft_dir }}/lmod/{{ lmod_version }}"
sudo: true
---
lua_include: /usr/include/lua5.2
---
lua_include: /usr/local
---
source_dir: /tmp
soft_dir: /usr/local
lmod_version: 5.8.6
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment