Skip to content

Commit

Permalink
Merge pull request #95 from pneerincx/fix/pre_deploy_checks
Browse files Browse the repository at this point in the history
Fix/pre deploy checks
  • Loading branch information
scimerman authored May 19, 2023
2 parents 3ab34eb + 043dcf8 commit f5b32d7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions roles/install_easybuild/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
ansible.builtin.blockinfile:
dest: "{{ ansible_env.HOME }}/.bashrc"
block: |
if [ -f "{{ easybuild_modules_dir }}/modules.bashrc" ]; then
source "{{ easybuild_modules_dir }}/modules.bashrc"
if [[ -f "{{ easybuild_modules_dir }}/modules.bashrc" ]]; then
source "{{ easybuild_modules_dir }}/modules.bashrc"
fi
marker: "# {mark} ANSIBLE MANAGED BLOCK - Setup environment for Lua, Lmod & EasyBuild."
insertafter: EOF
Expand All @@ -50,6 +50,7 @@
#
ansible.builtin.shell:
cmd: |
set -o pipefail
unset MODULEPATH
source "{{ easybuild_modules_dir }}/modules.bashrc" >/dev/null 2>&1
lua -v 2>&1 | grep -i Lua | sed 's|^.*Lua \([0-9\.]*\).*$|\1|'
Expand Down Expand Up @@ -108,6 +109,7 @@
#
ansible.builtin.shell:
cmd: |
set -o pipefail
unset MODULEPATH
source "{{ easybuild_modules_dir }}/modules.bashrc" >/dev/null 2>&1
lmod -v 2>&1 | sed '/^$/d' | sed 's|^.*Version \([0-9\.]*\).*$|\1|' | head -1
Expand Down Expand Up @@ -135,6 +137,7 @@
- name: Check if EasyBuild is installed and if yes what version.
ansible.builtin.shell:
cmd: |
set -o pipefail
source "{{ easybuild_modules_dir }}/modules.bashrc" >/dev/null 2>&1
module load EasyBuild/{{ easybuild_version }}
if eb --version 2>/dev/null | grep '^This is EasyBuild' >/dev/null 2>&1; then
Expand Down
2 changes: 1 addition & 1 deletion single_role_playbooks/pre_deploy_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
connection: local
- name: 'Download dependencies from Ansible Galaxy on the Ansible control host.'
ansible.builtin.command:
cmd: ansible-galaxy install -r requirements.yml --timeout 120
cmd: ansible-galaxy install -r requirements.yml{% if ansible_version.full is version_compare('2.13', '>=') %} --timeout 120{% endif %}
run_once: true # noqa run-once
delegate_to: localhost
connection: local
Expand Down
2 changes: 1 addition & 1 deletion static_inventories/betabarrel_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ all:
children:
jumphost:
hosts:
porch:
bb-porch:
deploy_admin_interface:
hosts:
betabarrel:
Expand Down
2 changes: 1 addition & 1 deletion static_inventories/copperfist_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ all:
children:
jumphost:
hosts:
porch:
cf-porch:
deploy_admin_interface:
hosts:
copperfist:
Expand Down
2 changes: 1 addition & 1 deletion static_inventories/wingedhelix_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ all:
children:
jumphost:
hosts:
porch:
wh-porch:
deploy_admin_interface:
hosts:
wh-dai:
Expand Down

0 comments on commit f5b32d7

Please sign in to comment.