Update make targets
Add all and clean Also removes prompts during make
This commit is contained in:
parent
fc86b974a7
commit
b9aec2a3c4
13
Makefile
13
Makefile
@ -3,6 +3,9 @@ VENV ?= venv
|
||||
.PHONY: default
|
||||
default: check
|
||||
|
||||
.PHONY: all
|
||||
all: cluster bootstrap-values apply
|
||||
|
||||
.PHONY: cluster
|
||||
cluster: ansible-cluster
|
||||
|
||||
@ -46,7 +49,7 @@ ansible_galaxy/roles: $(VENV) ./ansible_galaxy/requirements.yml
|
||||
|
||||
.PHONY: ansible-cluster
|
||||
ansible-cluster: $(VENV) ansible_galaxy
|
||||
env VIRTUAL_ENV=$(VENV) $(VENV)/bin/ansible-playbook -K -vv \
|
||||
env VIRTUAL_ENV=$(VENV) $(VENV)/bin/ansible-playbook -vv \
|
||||
$(shell test -f vault-keys.json && echo '-e "@vault-keys.json"') \
|
||||
./ansible_playbooks/setup-cluster.yml
|
||||
|
||||
@ -75,5 +78,13 @@ plan:
|
||||
.PHONY: apply
|
||||
apply:
|
||||
@terraform apply \
|
||||
-auto-approve \
|
||||
-var "nomad_secret_id=$(shell jq -r .SecretID nomad_bootstrap.json)" \
|
||||
-var "vault_token=$(shell jq -r .root_token vault-keys.json)"
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
env VIRTUAL_ENV=$(VENV) $(VENV)/bin/ansible-playbook -vv \
|
||||
./ansible_playbooks/clear-data.yml
|
||||
find -name "*.tfstate" -exec rm '{}' \;
|
||||
rm -f ./vault-keys.json ./nomad_bootstrap.json
|
||||
|
Loading…
Reference in New Issue
Block a user