add back the node constraint

This commit is contained in:
Andrea Dell'Amico 2023-05-22 20:42:03 +02:00
parent 37cab28696
commit e9b3868658
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 7 additions and 7 deletions

View File

@ -14,6 +14,12 @@
- name: Manage the installation of the ePAS configuration of the swarm service
block:
- name: Add the label that will be used as a constraint for the attachments volume
docker_node:
hostname: '{{ epas_docker_attachments_node }}'
labels:
epas_storage: 'attachments'
labels_state: 'merge'
- name: Add the label that will be used as a constraint for the postgresql DB
docker_node:
@ -40,12 +46,5 @@
compose:
- '{{ epas_compose_dir }}/docker-epas-stack.yml'
# - name: Connect the ePAS service to the haproxy-public network
# command: docker service update --network-add {{ epas_haproxy_public_net }} {{ item }} --update-delay 30s --update-parallelism 1
# with_items:
# - '{{ epas_docker_stack_name }}_{{ epas_docker_service_server_name }}'
# ignore_errors: True
# when: epas_behind_haproxy
when: docker_swarm_manager_node is defined and docker_swarm_manager_node
tags: [ 'epas', 'epas_swarm', 'epas_server' ]

View File

@ -94,6 +94,7 @@ services:
placement:
constraints:
- node.role == worker
- {{ epas_node_constraints }}
restart_policy:
condition: on-failure
delay: 5s