forked from ahembree/ansible-hms-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hms-docker.yml
36 lines (31 loc) · 946 Bytes
/
hms-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- hosts: all
become: yes
gather_facts: yes
vars:
regex: '[^A-Za-z0-9._-]'
replace: '_'
vars_files:
- vars/default.yml
roles:
- docker
tasks:
- name: Ensure Nvidia GPU role if enabled
import_role:
name: gpu
when: enable_nvidia_gpu is defined and enable_nvidia_gpu
- name: Ensure HMS-Docker role
import_role:
name: hmsdocker
- name: Verify all Traefik endpoints are accessible
uri:
url: http://{{ item.key }}.{{ hms_docker_domain }}
status_code: 200,302,401,403
validate_certs: no
with_dict:
- "{{ hms_docker_container_map }}"
when:
- item.value.traefik is defined and item.value.traefik
- item.value.enabled is defined and item.value.enabled
- hms_docker_container_map['traefik']['enabled'] is defined and hms_docker_container_map['traefik']['enabled']
- traefik_verify_endpoints is defined and traefik_verify_endpoints