From 7857fae9351310b91af3473661d19492379af4e8 Mon Sep 17 00:00:00 2001 From: lecorguille Date: Fri, 12 Feb 2021 14:33:23 +0100 Subject: [PATCH] cleanup - debug switch --- defaults/main.yml | 2 ++ tasks/main.yml | 16 ++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 1d06f83..6017b14 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -12,3 +12,5 @@ bind_paths: [] # go variables only_one_go_version: false golang_gopath: /opt/go/packages + +singularity_role_debug: false diff --git a/tasks/main.yml b/tasks/main.yml index 72650ef..3dfca68 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -97,6 +97,7 @@ - name: singularity | display singularity installed version debug: var: singularity_installed_version + when: singularity_role_debug - name: singularity | compile the Singularity binary | mconfig command: ./mconfig @@ -122,9 +123,10 @@ - not ansible_check_mode - singularity_installed_version.rc == 1 -# - name: singularity | debug make -# debug: -# var: singularity_make +- name: singularity | debug make + debug: + var: singularity_make + when: singularity_role_debug - name: singularity | compile the Singularity binary | make install make: @@ -139,9 +141,10 @@ - not ansible_check_mode - singularity_installed_version.rc == 1 -# - name: singularity | debug make install -# debug: -# var: singularity_make_install +- name: singularity | debug make install + debug: + var: singularity_make_install + when: singularity_role_debug - name: singularity | check singularity installed version command: 'singularity --version | grep "{{ singularity_version }}"' @@ -154,6 +157,7 @@ - name: singularity | display singularity installed version debug: var: singularity_installed_version + when: singularity_role_debug - name: singularity | config bind bind_path lineinfile: