Newer
Older
Chris Hines
committed
---
- include_vars: "{{ ansible_os_family }}.yml"
- name: install lua centos
package:
state: present
name:
- lua
- lua-filesystem
- lua-posix
- tcl
- rsync
- gcc
- lua-devel
Chris Hines
committed
become: true
when: ansible_os_family == 'RedHat'
yum: name={{ item }} state=present update_cache=yes enablerepo="Monash_University_EPEL7_EPEL_7_-_x86_64"
with_items:
- lua
- lua-filesystem
- lua-posix
- tcl
- rsync
- gcc
- lua-devel
when:
- '"DGX" in ansible_product_name'
- '"RedHat" in ansible_distribution'
- name: install lua debian
package:
name: lmod
state: present
Chris Hines
committed
become: true
Chris Hines
committed
when: ansible_os_family == 'Debian'
Chris Hines
committed
- name: stat lmod
stat: path="{{ soft_dir }}/lmod/{{ lmod_version }}"
register: lmodstat
Chris Hines
committed
- name: Download LMOD
get_url:
url=http://consistency0/src/Lmod-{{ lmod_version }}.tar.bz2
Chris Hines
committed
mode=0444
when: ansible_os_family == 'RedHat' and not lmodstat.stat.exists
Chris Hines
committed
- name: Uncompress LMOD
unarchive:
src={{ source_dir }}/Lmod-{{ lmod_version }}.tar.bz2
dest={{ source_dir }}
copy=no
creates={{ source_dir }}/Lmod-{{ lmod_version }}/README
when: ansible_os_family == 'RedHat' and not lmodstat.stat.exists
Chris Hines
committed
- 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 }}"
Chris Hines
committed
become: true
when: ansible_os_family == 'RedHat'