Migrate services part

This commit is contained in:
Tobias Reisinger 2024-09-27 00:02:36 +02:00
parent 7c59e4ae57
commit 73bce8f6e5
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
157 changed files with 3883 additions and 9 deletions

View file

@ -3,20 +3,18 @@ SHELL := /bin/bash
include .env
export
DNS_OUTPUT = "dns/hosts.js"
SERVICES_OUTPUT = "services/inventory/group_vars/all/opentofu.yaml"
DNS_OUTPUT = "dns/hosts.json"
SERVICES_OUTPUT = "inventory/group_vars/all/opentofu.yaml"
$(DNS_OUTPUT):
cd opentofu && \
tofu output --json \
tofu output --json \
| jq 'with_entries(.value |= .value).hosts' \
> ../dns/hosts.json
> $(DNS_OUTPUT)
$(SERVICES_OUTPUT):
cd opentofu && \
tofu output --json \
tofu output --json \
| yq -y '{opentofu: with_entries(.value |= .value)}' \
> ../services/inventory/group_vars/all/opentofu.yaml
> $(SERVICES_OUTPUT)
outputs: $(DNS_OUTPUT) $(SERVICES_OUTPUT)