Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @edwins ,
First of all thanks for this ansible role. I first tried the other singularity role but it is way more involved, and it depends on golang dep, which is deprecated.
I like that this role is simple and efficient. Because of its simplicity it just works.
One disadvantage I noticed is that the installation always runs, even if singularity is already installed. This slows down deployment, and is especially annoying when you made a small update somewhere else in your playbook or when you are testing. I also noticed that the package installation won't happen on Debian, even though the package names are the same as in Ubuntu.
So with this PR:
singularity version
is run to get the version. (singularity --version
when the version is lower than 3). If singularity is not installed, then this command returns an empty string''
.Also:
ansible_os_family
because package names among the Debian family and among the RedHat family are interchangable.state: present
for the packages. There is no reason to keep updating the build packages on rerunning the role. Most distributions have only one version in their repo anyway.