Skip to content

Commit 4847c4c

Browse files
committed
Set a restart policy for deployed containers
On reboot, Vault and Consul containers were not starting. Change the restart_policy to 'always' to ensure the services restart.
1 parent cf6b942 commit 4847c4c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

roles/vault/tasks/consul.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
volumes: "{{ _consul_volumes }}"
99
comparisons:
1010
'*': strict
11+
restart_policy: "always"
1112
env:
1213
CONSUL_BIND_INTERFACE: "{{ consul_bind_interface }}"
1314
CONSUL_CLIENT_INTERFACE: "{{ consul_bind_interface }}"

roles/vault/tasks/vault.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
volumes: "{{ _vault_volumes }}"
1010
comparisons:
1111
'*': strict
12+
restart_policy: "always"
1213
env:
1314
VAULT_LOCAL_CONFIG: "{{ vault_config | to_json }}"
1415
command: >

0 commit comments

Comments
 (0)