53 lines
2 KiB
YAML
53 lines
2 KiB
YAML
- name: Include variables
|
|
include_vars:
|
|
file: "../../../variables.yml"
|
|
|
|
- name: Install docker prerequsistes
|
|
apt:
|
|
pkg:
|
|
- squashfs-tools
|
|
- tinc
|
|
- curl
|
|
- uuid-dev
|
|
- libssl-dev
|
|
- build-essential
|
|
|
|
- name: create workfolder {{ ansible_env.HOME }}/singularity_build
|
|
shell: mkdir {{ ansible_env.HOME }}/singularity_build
|
|
|
|
#- name:
|
|
# shell: cd {{ ansible_env.HOME }}/singularity_build
|
|
|
|
- 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: 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: 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: decompress singularity
|
|
shell: tar -C {{ ansible_env.HOME }}/singularity_build/ -xvzf {{ ansible_env.HOME }}/singularity_build/singularity-{{ singularity_ver }}.tar.gz
|
|
|
|
#- name:
|
|
# shell: cd {{ ansible_env.HOME }}/singularity_build/singularity/
|
|
|
|
#- name:
|
|
# shell: PATH=$PATH:/usr/local/go/bin/
|
|
|
|
- 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 {{ ansible_env.HOME }}/singularity_build/singularity/builddir/
|
|
|
|
- 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
|
|
|