minor fixes (entrypoint) and restructuring

This commit is contained in:
2021-06-08 12:28:09 +02:00
parent aef1499e65
commit ea3195a93c
4 changed files with 51 additions and 26 deletions

View File

@@ -38,9 +38,6 @@
group: docker
when: False
- set_fact:
docker_network: slurm
- docker_network:
name: "{{docker_network}}"
state: present
@@ -51,10 +48,21 @@
name: git
state: present
- file:
path: "{{item}}"
owner: "{{unpriv_user}}"
group: "{{unpriv_user}}"
mode: "a=rx,u=rwx"
state: directory
with_items:
- "~{{unpriv_user}}/cobald/modules"
- "~{{unpriv_user}}/cobald"
- git:
repo: https://github.com/thoto/cobald
dest: "~{{unpriv_user}}/cobald-src"
version: bugfix/mixed_construction_methods
update: no
become: yes
become_user: "{{unpriv_user}}"
register: cobald_git_pull
@@ -72,10 +80,6 @@
database: passwd
key: "{{unpriv_user}}"
- import_tasks: telegraf.yml
vars:
docker_network: cobald
- name: run pip install
docker_container:
image: cobald
@@ -96,10 +100,18 @@
run: "{{tardis_git_pull.changed}}"
when: item.run
- import_tasks: telegraf.yml
- docker_container_info:
name: cobald
register: cobald_container_info
- docker_container:
name: cobald
image: cobald
hostname: cobald
hostname: |-
{{cobald_container_info.container.Config.Hostname | default('cobald-'+
lookup('password', '/dev/null chars=ascii_lowercase')) }}
domainname: cobald.local
volumes:
- "~{{unpriv_user}}/cobald:/etc/cobald"
@@ -113,4 +125,6 @@
detach: True
cleanup: True
interactive: True
command: /bin/bash
# command: /bin/bash
# python3 -m cobald.daemon /etc/cobald/config.yaml
command: python3 -m cobald.daemon /etc/cobald/config.yaml