Files
no-secrets-athq-ansible/roles/docker-deployments/tasks/main.yaml

232 lines
4.8 KiB
YAML

- include_vars: services.yaml
- name: Deploy Docker daemon.json
template:
src: daemon.json
dest: /etc/docker/daemon.json
- name: Create data-dir
file:
name: /data/
state: directory
- name: Create opt-dir
file:
name: /opt/
state: directory
- name: Async Icinga mount directory
file:
name: /data/async-icinga
state: directory
- name: Async Icinga database mount directory
file:
name: /data/async-icinga
state: directory
- name: Async Icinga Service (static)
template:
src: async-config.json.j2
dest: /data/async-icinga/config.json
notify:
- reload async icinga settings
- name: Async Icinga Service (static)
template:
src: async-icinga-config.json.j2
dest: /data/async-icinga/async-icinga-config.json
notify:
- reload async icinga settings
- name: Async Icinga Service (dynamic from backup file)
copy:
src: async-icinga-config-dynamic.json
dest: /data/async-icinga/
notify:
- reload async icinga settings
- name: Create data directories
file:
name: "/data/{{ item }}/"
state: directory
with_items:
- tmnf-replay-server
- atlantis-hub
- grafana
- event-dispatcher
- reactive-resume
- hedgedoc
- atlantis-verify
- soundlib-interface
- python-flask-picture-factory
- money-balancer
- atlantis-web-check
- ntfy
- code-server
- name: Copy AtlantisHub config
copy:
src: "atlantis-hub-content/config.yaml"
dest: "/data/atlantis-hub/config.yaml"
notify: restart hub
- name: Create AtlantisHubDirectories
file:
name: "/data/atlantis-hub/{{ item }}"
state: directory
with_items:
- static-icons
- instance
- static-cache
- name: Copy AtlantisHub static icons
copy:
src: "atlantis-hub-content/static-icons/"
dest: "/data/atlantis-hub/static-icons/"
- name: Copy AtlantisHub static icons
template:
src: "grafana.ini"
dest: "/data/grafana/grafana.ini"
- name: Create compose directories
file:
name: "/opt/{{ item }}"
state: directory
with_items:
- athq-landing
- grafana
- potaris
- sector32
- async-icinga
- tmnf-replay-server
- atlantis-hub
- grafana
- event-dispatcher
#- tor
- reactive-resume
- hedgedoc
- atlantis-verify
- soundlib-interface
- python-flask-picture-factory
- money-balancer
- atlantis-web-check
- ntfy
- ferchau-wscad
- code-server
- name: Copy compose templates
template:
src: "{{ item }}.yaml"
dest: "/opt/{{ item }}/"
with_items:
- athq-landing
- grafana
- potaris
- sector32
- async-icinga
- tmnf-replay-server
- atlantis-hub
- grafana
- event-dispatcher
#- tor
- hedgedoc
- atlantis-verify
- soundlib-interface
- python-flask-picture-factory
- money-balancer
- atlantis-web-check
- ntfy
- ferchau-wscad
- code-server
- name: Log into private registry
docker_login:
registry: registry.atlantishq.de
username: docker
password: HISTORY_PURGED_SECRET
- name: Deploy compose templates
community.docker.docker_compose_v2:
project_src: "/opt/{{ item }}/"
pull: "missing"
files:
- "{{ item }}.yaml"
with_items:
- athq-landing
- grafana
- potaris
- sector32
- async-icinga
- tmnf-replay-server
- atlantis-hub
- grafana
- event-dispatcher
#- tor
- reactive-resume
- hedgedoc
- atlantis-verify
- soundlib-interface
- python-flask-picture-factory
#- money-balancer
- atlantis-web-check
- ntfy
#- ferchau-wscad
- code-server
- name: OAuth2Proxy directories
file:
path: "/opt/oauth2proxy/{{ item }}/"
state: directory
recurse: yes
with_items:
- tmnf-replay-server
- atlantis-hub
- grafana
- async-icinga
- atlantis-verify
- soundlib-interface
- python-flask-picture-factory
#- reactive-resume
- money-balancer
- atlantis-web-check
- ferchau-wscad
- name: include services ports
include_vars: services.yaml
- name: Deploy OAuth2Proxy compose files
template:
src: oauth-standalone-docker-compose.yaml
dest: "/opt/oauth2proxy/{{ item }}/docker-compose.yaml"
with_items:
- tmnf-replay-server
- atlantis-hub
- grafana
- async-icinga
- atlantis-verify
- soundlib-interface
- python-flask-picture-factory
- reactive-resume
- money-balancer
- atlantis-web-check
- ferchau-wscad
- name: Deploy OAuth2Proxy
community.docker.docker_compose_v2:
project_src: /opt/oauth2proxy/{{ item }}/
pull: always
with_items:
- tmnf-replay-server
- atlantis-hub
- grafana
- async-icinga
- atlantis-verify
- soundlib-interface
- python-flask-picture-factory
#- reactive-resume
#- money-balancer
- atlantis-web-check
- ferchau-wscad