cloudserve-infrastructure/roles/whoami/tasks/main.yml

32 lines
682 B
YAML

---
# install whoami container
- name: Ensure upstream directory exists
ansible.builtin.file:
path: "{{ whoami_upstream_file_dir }}"
state: directory
mode: '0755'
become: true
tags:
- fs
- name: Update upstream template
ansible.builtin.template:
src: upstream.json.j2
dest: "{{ whoami_upstream_file_dir }}/upstream.json"
become: true
tags:
- fs
notify: "handle upstream"
- name: Deploy whoami to swarm
community.general.docker_stack:
name: "{{ stack.name }}"
state: present
prune: yes
compose:
- "{{ stack.compose }}"
when: stack is defined
become: yes
tags:
- docker-swarm
notify: "handle upstream"