Move all_services into opentofu
This commit is contained in:
parent
6fdfd338a1
commit
2ad3cce749
10 changed files with 415 additions and 267 deletions
18
Makefile
18
Makefile
|
@ -7,6 +7,16 @@ PWD := $(shell pwd)
|
|||
|
||||
.FORCE:
|
||||
|
||||
./inventory/group_vars/all/all_services.yml: .FORCE
|
||||
tofu output --json \
|
||||
| yq -y '{all_services: with_entries(.value |= .value).services | to_entries | map(.value)}' \
|
||||
> ./inventory/group_vars/all/all_services.yml
|
||||
|
||||
./inventory/group_vars/all/opentofu.yml: .FORCE
|
||||
tofu output --json \
|
||||
| yq -y '{opentofu: with_entries(.value |= .value)}' \
|
||||
> ./inventory/group_vars/all/opentofu.yml
|
||||
|
||||
./dns/hosts.json: .FORCE
|
||||
tofu output --json \
|
||||
| jq 'with_entries(.value |= .value).hosts' \
|
||||
|
@ -17,12 +27,8 @@ PWD := $(shell pwd)
|
|||
-e services_json_file=$(PWD)/dns/services.json \
|
||||
playbooks/create_services_for_dnscontrol.yml
|
||||
|
||||
./inventory/group_vars/all/opentofu.yaml: .FORCE
|
||||
tofu output --json \
|
||||
| yq -y '{opentofu: with_entries(.value |= .value)}' \
|
||||
> ./inventory/group_vars/all/opentofu.yaml
|
||||
|
||||
output: ./dns/hosts.json ./dns/services.json ./inventory/group_vars/all/opentofu.yaml
|
||||
output: ./dns/hosts.json ./dns/services.json ./inventory/group_vars/all/opentofu.yml
|
||||
|
||||
|
||||
./types-dnscontrol.d.ts:
|
||||
|
@ -30,7 +36,7 @@ output: ./dns/hosts.json ./dns/services.json ./inventory/group_vars/all/opentofu
|
|||
|
||||
tofu:
|
||||
tofu apply
|
||||
echo "\n=====\n"
|
||||
@printf "\n=====\n\n"
|
||||
$(MAKE) output
|
||||
|
||||
dns: ./types-dnscontrol.d.ts ./dns/hosts.json ./dns/services.json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue