41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
---
|
|
- name: Ensure Zitadel directories exist
|
|
become: true
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: "0755"
|
|
loop:
|
|
- "{{ zitadel_workspace }}"
|
|
- "{{ zitadel_workspace }}/certbot"
|
|
- "{{ zitadel_workspace }}/certbot/conf"
|
|
- "{{ zitadel_workspace }}/certbot/www"
|
|
- "{{ zitadel_workspace }}/nginx"
|
|
- "{{ zitadel_workspace }}/nginx/conf.d"
|
|
|
|
- name: Template Zitadel configuration files
|
|
become: true
|
|
ansible.builtin.template:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ zitadel_workspace }}/{{ item.dest }}"
|
|
mode: "{{ item.mode | default('0644') }}"
|
|
loop:
|
|
- { src: 'docker-compose.yaml', dest: 'docker-compose.yaml' }
|
|
- { src: 'nginx/conf.d/default.conf', dest: 'nginx/conf.d/default.conf' }
|
|
|
|
- name: Copy Zitadel static files
|
|
become: true
|
|
ansible.builtin.copy:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ zitadel_workspace }}/{{ item.dest }}"
|
|
mode: "{{ item.mode | default('0644') }}"
|
|
loop:
|
|
- { src: 'run.sh', dest: 'run.sh', mode: '0755' }
|
|
- { src: 'nginx/nginx.conf', dest: 'nginx/nginx.conf' }
|
|
|
|
- name: Bring up Zitadel stack
|
|
become: true
|
|
ansible.builtin.command: docker-compose -f {{ zitadel_workspace }}/docker-compose.yaml up -d
|
|
args:
|
|
chdir: "{{ zitadel_workspace }}"
|