-
Andreas Hamacher authoredAndreas Hamacher authored
main.yml 1.90 KiB
---
- include_vars: "{{ ansible_os_family }}.yml"
- name: install lua centos
package:
state: present
name:
- lua
- tcl
- rsync
- gcc
- lua-devel
become: true
when: ansible_os_family == 'RedHat'
- name: install lua centos
package:
state: present
enablerepo: epel
name:
- lua-filesystem
- lua-posix
become: true
when:
- ansible_os_family == 'RedHat'
- '"DGX" not in ansible_product_name'
- name: install lua RHEL7
yum:
state: present
update_cache: yes
enablerepo: "org_monash_uni_EPEL_7_EPEL_7_-_x86_64"
name:
- lua
- lua-filesystem
- lua-posix
- tcl
- rsync
- gcc
- lua-devel
when:
- '"DGX" in ansible_product_name'
- '"RedHat" in ansible_distribution'
become: true
- name: install lua debian
package:
name: lmod
state: present
become: true
when: ansible_os_family == 'Debian'
- name: stat lmod
stat: path="{{ soft_dir }}/lmod/{{ lmod_version }}"
register: lmodstat
- name: Download LMOD
get_url:
url=https://object-store.rc.nectar.org.au/v1/AUTH_56ccfd36d0ad454a883a98e8489c97b5/hpc-repo/src/Lmod-{{ lmod_version }}.tar.bz2
dest={{ source_dir }}/Lmod-{{ lmod_version }}.tar.bz2
mode=0444
when: ansible_os_family == 'RedHat' and not lmodstat.stat.exists
- 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