labels, some cleanup

This commit is contained in:
2021-06-22 17:17:11 +02:00
parent 1f4dfe1821
commit c35dc25c39
5 changed files with 39 additions and 32 deletions

View File

@@ -1,7 +1,8 @@
- include_vars: cobald-slurm.yml
when: cobald_slurm | default(False)
- include_role:
- name: build cobald:slurm docker image
include_role:
name: slurm
tasks_from: dockerimage
vars:
@@ -15,7 +16,8 @@
content: "{{ lookup('file', 'init-cobaldmodules.sh') }}"
when: cobald_slurm | default(False)
- include_tasks: dockerimage-generic.yml
- name: build generic cobald docker image
include_tasks: dockerimage-generic.yml
when: not (cobald_slurm | default(False))
- name: make cobald data volume
@@ -25,24 +27,28 @@
owner: "{{unpriv_user}}"
group: docker
- copy:
- name: copy cobald config (does nothing yet)
copy:
src: cobald-config/
dest: /container/volumes/cobald
owner: "{{unpriv_user}}"
group: docker
when: False
- docker_network:
name: "{{cobald_docker_network}}" # FIXME
- name: ensure network for cobald container exists
docker_network:
name: "{{cobald_docker_network}}"
state: present
# docker run -v $(pwd)/cobald-config-host:/etc/cobald -v $(pwd)/cobald:/cobald --rm -it cobald bash
- yum:
- name: install git
yum:
name: git
state: present
- file:
- name: make directories for cobald configuration and modules
file:
path: "{{item}}"
owner: "{{unpriv_user}}"
group: "{{unpriv_user}}"
@@ -52,7 +58,8 @@
- "~{{unpriv_user}}/cobald/modules"
- "~{{unpriv_user}}/cobald"
- git:
- name: clone cobald code from git
git:
repo: https://github.com/thoto/cobald
dest: "~{{unpriv_user}}/cobald-src"
version: bugfix/mixed_construction_methods
@@ -61,7 +68,8 @@
become_user: "{{unpriv_user}}"
register: cobald_git_pull
- git:
- name: clone tardis code from git
git:
repo: https://github.com/MatterMiners/tardis
dest: "~{{unpriv_user}}/tardis-src"
version: master
@@ -74,7 +82,7 @@
database: passwd
key: "{{unpriv_user}}"
- name: run pip install
- name: run pip install on cobald and tardis
docker_container:
image: "cobald:{{cobald_image_tag|default('latest')}}"
name: "cobald-src-{{item.name}}-install"