Streamline example app variable use
This commit is contained in:
parent
f7389dc8c3
commit
774f3f7c2e
4 changed files with 7 additions and 5 deletions
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
whoami_version: latest
|
||||
|
||||
whoami_upstream_file_dir: "{{ docker_stack_files_dir }}/whoami"
|
||||
whoami_upstream_file_dir: "{{ docker_stack_files_dir }}/{{ stack.name }}"
|
||||
|
||||
whoami_use_https: true
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
## Register reverse proxy
|
||||
|
||||
# figure out if upstream id exists
|
||||
- name: check whoami upstream
|
||||
- name: check {{ stack.name }} upstream
|
||||
community.docker.docker_container_exec:
|
||||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
listen: "update upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
- name: remove old whoami upstream
|
||||
- name: remove old {{ stack.name }} upstream
|
||||
community.docker.docker_container_exec:
|
||||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
listen: "update upstream"
|
||||
|
||||
# upstream has to be created
|
||||
- name: add whoami upstream
|
||||
- name: add {{ stack.name }} upstream
|
||||
community.docker.docker_container_exec:
|
||||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ version: "3.7"
|
|||
|
||||
services:
|
||||
app:
|
||||
image: containous/whoami:{{ whoami_version }}
|
||||
image: {{ stack_image }}:{{ whoami_version }}
|
||||
networks:
|
||||
- "{{ docker_swarm_public_network_name }}"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
|
||||
|
||||
stack:
|
||||
name: whoami
|
||||
compose: "{{ lookup('template', 'docker-stack.yml.j2') | from_yaml }}"
|
||||
|
||||
stack_image: "containous/whoami"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue