Skip to content
Snippets Groups Projects
Commit bd7c31ad authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

fixing modules on debian

Former-commit-id: 5bb27ab0
parent 5b8428a7
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- name: make sure environment modules are installed - name: make sure environment modules are installed
package: package:
name: environment-modules name: environment-modules
state: installed state: present
become: true become: true
- name: template lmod bash - name: template lmod bash
...@@ -30,6 +30,9 @@ ...@@ -30,6 +30,9 @@
become_user: root become_user: root
when: default_modules == "lmod" when: default_modules == "lmod"
# vars:
# MODULESHOMEvar: '/usr/share/modules'
- name: template modulecmd bash - name: template modulecmd bash
template: src=modulecmd.sh.j2 dest=/etc/profile.d/modulecmd.sh template: src=modulecmd.sh.j2 dest=/etc/profile.d/modulecmd.sh
become: true become: true
...@@ -59,3 +62,14 @@ ...@@ -59,3 +62,14 @@
become: true become: true
become_user: root become_user: root
when: default_modules == "modulecmd" when: default_modules == "modulecmd"
- name: Create a symbolic link
file:
src: /usr/share/modules
dest: /usr/share/Modules
owner: root
group: root
state: link
mode: u=rwx,g=rx,o=rx
become: true
when: ansible_os_family == 'Debian' and default_modules == 'modulecmd'
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- include_vars: "{{ ansible_os_family }}.yml" - include_vars: "{{ ansible_os_family }}.yml"
- name: install lua centos - name: install lua centos
yum: name={{ item }} state=installed update_cache=yes yum: name={{ item }} state=present update_cache=yes
with_items: with_items:
- lua - lua
- lua-filesystem - lua-filesystem
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'
- name: install lua RHEL7 - name: install lua RHEL7
yum: name={{ item }} state=installed update_cache=yes enablerepo="Monash_University_EPEL7_EPEL_7_-_x86_64" yum: name={{ item }} state=present update_cache=yes enablerepo="Monash_University_EPEL7_EPEL_7_-_x86_64"
with_items: with_items:
- lua - lua
- lua-filesystem - lua-filesystem
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
become: true become: true
- name: install lua debian - name: install lua debian
apt: name=lmod state=installed apt: name=lmod state=present
become: true become: true
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
args: args:
dest: /usr/share/Modules/init/.modulespath dest: /usr/share/Modules/init/.modulespath
line: /usr/local/Modules/modulefiles line: /usr/local/Modules/modulefiles
ignore_errors: true ignore_errors: false
become: true become: true
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'
...@@ -24,6 +24,6 @@ ...@@ -24,6 +24,6 @@
args: args:
dest: /usr/share/modules/init/.modulespath dest: /usr/share/modules/init/.modulespath
line: /usr/local/Modules/modulefiles line: /usr/local/Modules/modulefiles
ignore_errors: true ignore_errors: false
become: true become: true
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
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