functional deployment without SSO for trade-hub
This commit is contained in:
@@ -45,6 +45,13 @@
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: Create the application source directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ trade_hub_app_dir }}/{{ item }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
loop: "{{ trade_hub_app_subdirs }}"
|
||||
|
||||
- name: Stage the application build context
|
||||
ansible.builtin.copy:
|
||||
src: "{{ role_path }}/files/trade-hub/{{ item.src }}"
|
||||
@@ -144,6 +151,23 @@
|
||||
name: "{{ trade_hub_network }}"
|
||||
state: present
|
||||
|
||||
- name: Check whether the shared proxy network exists
|
||||
ansible.builtin.command: podman network exists npm_internal
|
||||
register: trade_hub_npm_network_check
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
check_mode: false
|
||||
|
||||
- name: Require the shared proxy network to exist
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- trade_hub_npm_network_check.rc == 0
|
||||
fail_msg: >-
|
||||
The npm_internal podman network does not exist on {{ inventory_hostname }}.
|
||||
Run the network role first, e.g.
|
||||
ansible-playbook -i inventory.ini ansible-playbook.yml --tags "network,trade_hub".
|
||||
quiet: true
|
||||
|
||||
- name: Create the PostgreSQL data volume
|
||||
containers.podman.podman_volume:
|
||||
name: "{{ trade_hub_volume }}"
|
||||
@@ -192,9 +216,13 @@
|
||||
image: "{{ trade_hub_frontend_image }}:{{ trade_hub_image_tag }}"
|
||||
state: started
|
||||
recreate: "{{ trade_hub_recreate_containers | bool }}"
|
||||
network: "{{ trade_hub_network }}"
|
||||
# Keep sc-inventory for the "backend" DNS alias and join the shared proxy
|
||||
# network with a fixed address so the proxy-manager upstream never changes.
|
||||
network:
|
||||
- "{{ trade_hub_network }}"
|
||||
- "npm_internal:ip={{ trade_hub_frontend_ip }}"
|
||||
ports:
|
||||
- "{{ trade_hub_frontend_bind }}:{{ trade_hub_frontend_port }}:80"
|
||||
- "{{ trade_hub_frontend_bind }}:{{ trade_hub_frontend_port }}:{{ trade_hub_frontend_port }}"
|
||||
restart_policy: unless-stopped
|
||||
when: not ansible_check_mode
|
||||
|
||||
|
||||
Reference in New Issue
Block a user