Stop Nomad and Vault when recovering Consul
This commit is contained in:
parent
3b9ad36ed0
commit
162f567c85
@ -1,4 +1,24 @@
|
|||||||
---
|
---
|
||||||
|
- name: Stop Nomad
|
||||||
|
hosts: nomad_instances
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Stop Nomad
|
||||||
|
systemd:
|
||||||
|
name: nomad
|
||||||
|
state: stopped
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Stop Vault
|
||||||
|
hosts: nomad_instances
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Stop Vault
|
||||||
|
systemd:
|
||||||
|
name: vault
|
||||||
|
state: stopped
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Recover Consul
|
- name: Recover Consul
|
||||||
hosts: consul_instances
|
hosts: consul_instances
|
||||||
|
|
||||||
@ -42,3 +62,23 @@
|
|||||||
name: consul
|
name: consul
|
||||||
state: restarted
|
state: restarted
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Start Vault
|
||||||
|
hosts: nomad_instances
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Start Vault
|
||||||
|
systemd:
|
||||||
|
name: vault
|
||||||
|
state: started
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Start Nomad
|
||||||
|
hosts: nomad_instances
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Start Nomad
|
||||||
|
systemd:
|
||||||
|
name: nomad
|
||||||
|
state: started
|
||||||
|
become: true
|
||||||
|
Loading…
Reference in New Issue
Block a user