Migrate dns part
This commit is contained in:
commit
344710e831
12 changed files with 377 additions and 0 deletions
31
Makefile
Normal file
31
Makefile
Normal file
|
@ -0,0 +1,31 @@
|
|||
SHELL := /bin/bash
|
||||
|
||||
include .env
|
||||
export
|
||||
|
||||
DNS_OUTPUT = "dns/hosts.js"
|
||||
SERVICES_OUTPUT = "services/inventory/group_vars/all/opentofu.yaml"
|
||||
|
||||
$(DNS_OUTPUT):
|
||||
cd opentofu && \
|
||||
tofu output --json \
|
||||
| jq 'with_entries(.value |= .value).hosts' \
|
||||
> ../dns/hosts.json
|
||||
|
||||
$(SERVICES_OUTPUT):
|
||||
cd opentofu && \
|
||||
tofu output --json \
|
||||
| yq -y '{opentofu: with_entries(.value |= .value)}' \
|
||||
> ../services/inventory/group_vars/all/opentofu.yaml
|
||||
|
||||
outputs: $(DNS_OUTPUT) $(SERVICES_OUTPUT)
|
||||
|
||||
|
||||
./types-dnscontrol.d.ts:
|
||||
dnscontrol write-types
|
||||
|
||||
dns: $(DNS_OUTPUT) ./types-dnscontrol.d.ts
|
||||
dnscontrol push
|
||||
|
||||
dns-check: $(DNS_OUTPUT) ./types-dnscontrol.d.ts
|
||||
dnscontrol check-creds ovh
|
Loading…
Add table
Add a link
Reference in a new issue