Make target to stop Nomad cluster
This commit is contained in:
parent
8d63c50ffb
commit
33ec66346b
20
Makefile
20
Makefile
@ -59,24 +59,18 @@ ansible-cluster: $(VENV) ansible_galaxy
|
||||
./ansible_playbooks/setup-cluster.yml
|
||||
|
||||
.PHONY: bootstrap-values
|
||||
bootstrap-values: $(VENV) ansible_galaxy
|
||||
env VIRTUAL_ENV=$(VENV) $(VENV)/bin/ansible-playbook -vv \
|
||||
-e "@vault-keys.json" \
|
||||
./ansible_playbooks/bootstrap-values.yml
|
||||
|
||||
.PHONY: recover-consul
|
||||
recover-consul: $(VENV)
|
||||
$(VENV)/bin/ansible-playbook -K ./ansible_playbooks/recover-consul.yaml
|
||||
bootstrap-values: $(VENV)
|
||||
env NOMAD_ADDR=192.168.2.101 \
|
||||
NOMAD_TOKEN=$(shell jq -r .SecretID nomad_bootstrap.json) \
|
||||
$(VENV)/bin/python ./nomad_vars.py
|
||||
|
||||
.PHONY: recover-nomad
|
||||
recover-nomad: $(VENV)
|
||||
$(VENV)/bin/ansible-playbook -K ./ansible_playbooks/recover-nomad.yaml
|
||||
|
||||
.PHONY: unseal-vault
|
||||
unseal-vault: $(VENV)
|
||||
env VIRTUAL_ENV=$(VENV) $(VENV)/bin/ansible-playbook -vv \
|
||||
-e "@vault-keys.json" \
|
||||
./ansible_playbooks/unseal-vault.yml
|
||||
.PHONY: stop-cluster
|
||||
stop-cluster: $(VENV)
|
||||
$(VENV)/bin/ansible-playbook -K ./ansible_playbooks/stop-cluster.yml
|
||||
|
||||
.PHONY: init
|
||||
init:
|
||||
|
@ -8,23 +8,3 @@
|
||||
name: nomad
|
||||
state: stopped
|
||||
become: true
|
||||
|
||||
- name: Stop Vault
|
||||
hosts: nomad_instances
|
||||
|
||||
tasks:
|
||||
- name: Stop Vault
|
||||
systemd:
|
||||
name: vault
|
||||
state: stopped
|
||||
become: true
|
||||
|
||||
- name: Stop Consul
|
||||
hosts: consul_instances
|
||||
|
||||
tasks:
|
||||
- name: Stop Consul
|
||||
systemd:
|
||||
name: consul
|
||||
state: stopped
|
||||
become: true
|
||||
|
Loading…
Reference in New Issue
Block a user