New playbook to stop cluster gracefully

This commit is contained in:
IamTheFij 2022-11-18 08:57:41 -08:00
parent 049d9f0fe0
commit 3b9ad36ed0

View File

@ -1,7 +1,6 @@
--- ---
- name: Stop cluster - name: Stop Nomad
hosts: consul_instances hosts: nomad_instances
serial: 1
tasks: tasks:
- name: Stop Nomad - name: Stop Nomad
@ -10,14 +9,22 @@
state: stopped state: stopped
become: true become: true
- name: Stop Vault
hosts: nomad_instances
tasks:
- name: Stop Vault - name: Stop Vault
systemd: systemd:
name: vault name: vault
state: stopped state: stopped
become: true become: true
- name: Stop Consul
hosts: consul_instances
tasks:
- name: Stop Consul - name: Stop Consul
systemd: systemd:
name: consul name: consul
state: stopped state: stopped
become: true become: true