|
@@ -12,38 +12,42 @@
|
|
|
- libssl-dev
|
|
|
- build-essential
|
|
|
|
|
|
-- name:
|
|
|
- shell: mkdir singularity_build
|
|
|
+- name: create workfolder {{ ansible_env.HOME }}/singularity_build
|
|
|
+ shell: mkdir {{ ansible_env.HOME }}/singularity_build
|
|
|
|
|
|
-- name:
|
|
|
- shell: cd singularity_build
|
|
|
+#- name:
|
|
|
+# shell: cd {{ ansible_env.HOME }}/singularity_build
|
|
|
|
|
|
-- name:
|
|
|
- shell: wget https://dl.google.com/go/go{{ singularity_go_ver }}.linux-amd64.tar.gz
|
|
|
+- name: download go
|
|
|
+ shell: wget -O {{ ansible_env.HOME }}/singularity_build/go{{ singularity_go_ver }}.linux-amd64.tar.gz https://dl.google.com/go/go{{ singularity_go_ver }}.linux-amd64.tar.gz
|
|
|
|
|
|
-- name:
|
|
|
- shell: tar -C /usr/local -xzf go{{ singularity_go_ver }}.linux-amd64.tar.gz
|
|
|
+- name: decompress go in /usr/local
|
|
|
+ shell: tar -C /usr/local -xzf {{ ansible_env.HOME }}/singularity_build/go{{ singularity_go_ver }}.linux-amd64.tar.gz
|
|
|
|
|
|
-- name:
|
|
|
- shell: wget https://github.com/sylabs/singularity/releases/download/v{{ singularity_ver }}/singularity-{{ singularity_ver }}.tar.gz
|
|
|
+- name: download singularity
|
|
|
+ shell: wget -O {{ ansible_env.HOME }}/singularity_build/singularity-{{ singularity_ver }}.tar.gz https://github.com/sylabs/singularity/releases/download/v{{ singularity_ver }}/singularity-{{ singularity_ver }}.tar.gz
|
|
|
|
|
|
-- name:
|
|
|
- shell: tar -xvzf singularity-{{ singularity_ver }}.tar.gz
|
|
|
+- name: decompress singularity
|
|
|
+ shell: tar -C {{ ansible_env.HOME }}/singularity_build/ -xvzf {{ ansible_env.HOME }}/singularity_build/singularity-{{ singularity_ver }}.tar.gz
|
|
|
|
|
|
-- name:
|
|
|
- shell: cd singularity/
|
|
|
+#- name:
|
|
|
+# shell: cd {{ ansible_env.HOME }}/singularity_build/singularity/
|
|
|
|
|
|
-- name:
|
|
|
- shell: PATH=$PATH:/usr/local/go/bin/
|
|
|
+#- name:
|
|
|
+# shell: PATH=$PATH:/usr/local/go/bin/
|
|
|
|
|
|
-- name:
|
|
|
- shell: ./mconfig -s --without-network -p /opt/singularity-{{ singularity_ver }}/
|
|
|
+- name: configure singularity for build
|
|
|
+ shell: "PATH=$PATH:/usr/local/go/bin/ && cd /root/singularity_build/singularity/ && {{ ansible_env.HOME }}/singularity_build/singularity/./mconfig -s --without-network -p /opt/singularity-{{ singularity_ver }}/"
|
|
|
|
|
|
-- name:
|
|
|
- shell: cd builddir/
|
|
|
+#- name:
|
|
|
+# shell: cd {{ ansible_env.HOME }}/singularity_build/singularity/builddir/
|
|
|
|
|
|
-- name:
|
|
|
- shell: make
|
|
|
+- name: build singularity
|
|
|
+ shell: make -C {{ ansible_env.HOME }}/singularity_build/singularity/builddir/
|
|
|
+
|
|
|
+- name: install singularity
|
|
|
+ shell: make install -C {{ ansible_env.HOME }}/singularity_build/singularity/builddir/
|
|
|
+
|
|
|
+- name: link singularity in /bin/singularity
|
|
|
+ shell: ln -s /opt/singularity-{{ singularity_ver }}/bin/singularity /bin/singularity
|
|
|
|
|
|
-- name:
|
|
|
- shell: make install
|