telegraf + influxdb
This commit is contained in:
@@ -38,16 +38,79 @@
|
||||
group: docker
|
||||
when: False
|
||||
|
||||
- set_fact:
|
||||
docker_network: slurm
|
||||
|
||||
- docker_network:
|
||||
name: "{{docker_network}}"
|
||||
state: present
|
||||
|
||||
# docker run -v $(pwd)/cobald-config-host:/etc/cobald -v $(pwd)/cobald:/cobald --rm -it cobald bash
|
||||
|
||||
- yum:
|
||||
name: git
|
||||
state: present
|
||||
|
||||
- git:
|
||||
repo: https://github.com/thoto/cobald
|
||||
dest: "~{{unpriv_user}}/cobald-src"
|
||||
version: bugfix/mixed_construction_methods
|
||||
become: yes
|
||||
become_user: "{{unpriv_user}}"
|
||||
register: cobald_git_pull
|
||||
|
||||
- git:
|
||||
repo: https://github.com/MatterMiners/tardis
|
||||
dest: "~{{unpriv_user}}/tardis-src"
|
||||
version: master
|
||||
become: yes
|
||||
become_user: "{{unpriv_user}}"
|
||||
register: tardis_git_pull
|
||||
|
||||
- name: "get unpriv_user {{unpriv_user}} uid and gid"
|
||||
getent:
|
||||
database: passwd
|
||||
key: "{{unpriv_user}}"
|
||||
|
||||
- import_tasks: telegraf.yml
|
||||
vars:
|
||||
docker_network: cobald
|
||||
|
||||
- name: run pip install
|
||||
docker_container:
|
||||
image: cobald
|
||||
name: "cobald-src-{{item.name}}-install"
|
||||
volumes:
|
||||
- "~{{unpriv_user}}/{{item.name}}-src:/usr/local/src/{{item.name}}:rw"
|
||||
state: started
|
||||
detach: False
|
||||
cleanup: True
|
||||
user: "{{getent_passwd[unpriv_user][1]}}:{{getent_passwd[unpriv_user][2]}}"
|
||||
entrypoint: ""
|
||||
command: |
|
||||
bash -c 'HOME=/tmp pip3 install --editable /usr/local/src/{{item.name}}'
|
||||
with_items:
|
||||
- name: cobald
|
||||
run: "{{cobald_git_pull.changed}}"
|
||||
- name: tardis
|
||||
run: "{{tardis_git_pull.changed}}"
|
||||
when: item.run
|
||||
|
||||
- docker_container:
|
||||
name: cobald
|
||||
image: cobald
|
||||
hostname: cobald
|
||||
domainname: cobald.local
|
||||
volumes:
|
||||
- /container/volumes/cobald:/etc/cobald:ro
|
||||
- "~{{unpriv_user}}/cobald:/etc/cobald"
|
||||
# - /container/volumes/cobald:/etc/cobald:ro
|
||||
- "~{{unpriv_user}}/cobald/modules:/usr/local/src/cobaldmodules"
|
||||
- "~{{unpriv_user}}/cobald-src:/usr/local/src/cobald:ro"
|
||||
- "~{{unpriv_user}}/tardis-src:/usr/local/src/tardis:ro"
|
||||
networks:
|
||||
- name: "{{docker_network}}"
|
||||
state: started
|
||||
detach: True
|
||||
cleanup: True
|
||||
when: False
|
||||
|
||||
- include_tasks: dev.yml
|
||||
interactive: True
|
||||
command: /bin/bash
|
||||
|
Reference in New Issue
Block a user