Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/pre deploy checks #95

Merged
merged 4 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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