implemented compose by url, parse, local yaml.
This commit is contained in:
1 parent
53695f4fff
commit
784fff8faf
218 files changed
+2271
-640
No files matched your search
+17
-41
@@ -12,44 +12,20 @@
|
||||
- "{{ ocis_data_dir }}"
|
||||
tags: [ocis]
|
||||
|
||||
- name: Render oCIS environment
|
||||
ansible.builtin.template:
|
||||
src: env.j2
|
||||
dest: "{{ ocis_dir }}/.env"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
no_log: true
|
||||
tags: [ocis, config]
|
||||
|
||||
- name: Ensure oCIS proxy network exists
|
||||
community.docker.docker_network:
|
||||
name: "{{ ocis_traefik_network }}"
|
||||
state: present
|
||||
when: ocis_routing_mode == "traefik"
|
||||
tags: [ocis, docker]
|
||||
|
||||
- name: Render oCIS Compose file
|
||||
ansible.builtin.template:
|
||||
src: compose.yaml.j2
|
||||
dest: "{{ ocis_dir }}/compose.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify: restart ocis
|
||||
tags: [ocis, compose]
|
||||
|
||||
- name: Allow oCIS ports
|
||||
community.general.ufw:
|
||||
rule: allow
|
||||
port: "{{ item }}"
|
||||
proto: tcp
|
||||
loop: "{{ ocis_tcp_ports }}"
|
||||
when: ocis_routing_mode == "host"
|
||||
tags: [ocis, firewall]
|
||||
|
||||
- name: Start oCIS
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ ocis_dir }}"
|
||||
state: present
|
||||
tags: [ocis, compose]
|
||||
- name: Deploy oCIS Compose project
|
||||
ansible.builtin.include_role:
|
||||
name: compose_project
|
||||
vars:
|
||||
compose_project_dir: "{{ ocis_dir }}"
|
||||
compose_project_directories:
|
||||
- "{{ ocis_dir }}"
|
||||
- "{{ ocis_config_dir }}"
|
||||
- "{{ ocis_data_dir }}"
|
||||
compose_project_env_template_src: "{{ playbook_dir }}/../roles/ocis/templates/env.j2"
|
||||
compose_project_compose_template_src: "{{ playbook_dir }}/../roles/ocis/templates/compose.yaml.j2"
|
||||
compose_project_override_template_src: "{{ playbook_dir }}/../roles/ocis/templates/compose.override.yaml.j2"
|
||||
compose_project_create_proxy_network: "{{ ocis_routing_mode == 'traefik' }}"
|
||||
compose_project_proxy_network: "{{ ocis_traefik_network }}"
|
||||
compose_project_firewall_ports: "{{ ocis_tcp_ports }}"
|
||||
compose_project_firewall_enabled: "{{ ocis_routing_mode in ['host', 'traefik_file'] }}"
|
||||
tags: [ocis]
|
||||
Reference in new issue
Block a user