Diffstat (limited to 'deploy')
| -rw-r--r-- | deploy/inventory.yml | 2 | ||||
| -rw-r--r-- | deploy/playbook.yml | 23 |
2 files changed, 3 insertions, 22 deletions
diff --git a/deploy/inventory.yml b/deploy/inventory.yml index 6b8a384..d3acab8 100644 --- a/deploy/inventory.yml +++ b/deploy/inventory.yml @@ -8,7 +8,6 @@ all: saya_today_web_hostname: sayauz-prod saya_today_web_ipv4_address: 172.16.0.17 saya_today_web_listen_address: saya.uz - saya_today_web_unix_sockets_mount: '/etc/sayauz' stage: hosts: @@ -18,4 +17,3 @@ all: saya_today_web_hostname: sayauz-stage saya_today_web_ipv4_address: 172.16.0.18 saya_today_web_listen_address: stage.saya.uz - saya_today_web_unix_sockets_mount: '/etc/sayauz' diff --git a/deploy/playbook.yml b/deploy/playbook.yml index 9719ed9..8fb9088 100644 --- a/deploy/playbook.yml +++ b/deploy/playbook.yml @@ -2,27 +2,9 @@ - name: Deploy saya-today-web Docker Container hosts: all remote_user: svc_github - - vars: - docker_volumes: - - "{{ saya_today_web_name }}-volume:/data:rw" tasks: - - name: Initialize Unix socket volume - when: >- - saya_today_web_unix_sockets_path is defined and - saya_today_web_unix_sockets_path is string and - saya_today_web_unix_sockets_path | length > 0 - block: - - name: Ensure Unix socket volume exists - community.docker.docker_volume: - name: "sayana_sockets" - - name: Include Unix socket volume in docker volumes list - ansible.builtin.set_fact: - docker_volumes: >- - {{ docker_volumes + ["sayana_sockets:" ~ saya_today_web_unix_sockets_path ~ ":rw"] }} - - - name: Create a data volume + - name: Create a volume community.docker.docker_volume: name: "{{ saya_today_web_name }}-volume" @@ -47,7 +29,8 @@ networks: - name: caddy ipv4_address: "{{ saya_today_web_ipv4_address }}" - volumes: "{{ docker_volumes }}" + volumes: + - "{{ saya_today_web_name }}-volume:/data:rw" restart_policy: unless-stopped no_log: true ... |