updated README, use 1 place for the release name (all.yaml)

This commit is contained in:
2024-11-17 17:54:49 +01:00
parent 9057c75b1f
commit 4654b7484c
3 changed files with 35 additions and 6 deletions

View File

@@ -5,8 +5,10 @@ TOKEN = $(shell ansible-vault decrypt --vault-password-file \
~/.config/ansible/hcloud.secret --output - \
group_vars/all/vars.yaml | cut -d' ' -f2)
SNAPNAME = $(shell cat group_vars/all/all.yaml | yq .snapshot)
SNAPSHOT = $(shell hcloud image list -t snapshot -o yaml | \
yq '. | map(select(.description == "FreeBSD-14.1-RELEASE-hcloud-init")) | .[].id')
yq '. | map(select(.description == "$(SNAPNAME)")) | .[].id')
OPTIONS = -i inventory -t active
CREATE_COMMAND = ansible-playbook create.yaml $(OPTIONS)
@@ -17,6 +19,9 @@ DEBUG_COMMAND = ansible-playbook debug.yaml $(OPTIONS)
ENV = HCLOUD_TOKEN="$(TOKEN)" SNAPSHOT="$(SNAPSHOT)" ANSIBLE_VERBOSITY=$(verbose)
test:
@echo SNAPSHOT="$(SNAPSHOT)"
all: create deploy
debug: