Skip to content

Commit

Permalink
Merge pull request #4 from dbenaben/pass-check
Browse files Browse the repository at this point in the history
Add condition to pass the "check mode"
  • Loading branch information
lecorguille authored Jun 3, 2019
2 parents b692c28 + 6553468 commit aa6d519
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
PATH: '{{ golang_install_dir }}/bin:{{ ansible_env.PATH }}'
GOROOT: '{{ golang_install_dir }}'
GOPATH: '{{ golang_gopath }}'
when: go_installed.rc == 1
when:
- not ansible_check_mode
- go_installed.rc == 1

- name: singularity | create directory for singularity
file:
Expand All @@ -65,7 +67,9 @@
PATH: '{{ golang_install_dir }}/bin:{{ ansible_env.PATH }}'
GOROOT: '{{ golang_install_dir }}'
GOPATH: '{{ golang_gopath }}'
when: singularity_installed_version.rc == 1
when:
- not ansible_check_mode
- singularity_installed_version.rc == 1

- name: singularity | compile the Singularity binary | make
command: make -C builddir
Expand All @@ -75,7 +79,9 @@
PATH: '{{ golang_install_dir }}/bin:{{ ansible_env.PATH }}'
GOROOT: '{{ golang_install_dir }}'
GOPATH: '{{ golang_gopath }}'
when: singularity_installed_version.rc == 1
when:
- not ansible_check_mode
- singularity_installed_version.rc == 1

- name: singularity | compile the Singularity binary | make install
command: make -C builddir install
Expand All @@ -85,7 +91,9 @@
PATH: '{{ golang_install_dir }}/bin:{{ ansible_env.PATH }}'
GOROOT: '{{ golang_install_dir }}'
GOPATH: '{{ golang_gopath }}'
when: singularity_installed_version.rc == 1
when:
- not ansible_check_mode
- singularity_installed_version.rc == 1

- name: singularity | check singularity installed version
command: 'bash -c "singularity --version | grep \"{{ singularity_version }}\""'
Expand All @@ -99,4 +107,4 @@
line: 'bind path = {{ item }}'
create: yes
backup: yes
with_items: "{{ bind_paths }}"
with_items: "{{ bind_paths | default([]) }}"

0 comments on commit aa6d519

Please sign in to comment.