-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (40 loc) · 1.84 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
SHELL = /bin/bash
MANAGED = playbooks/vars/infra-sf.yaml \
playbooks/vars/infra-rdo.yaml \
playbooks/vars/nodepool-sf.yaml \
playbooks/vars/nodepool-tripleo.yaml \
playbooks/vars/nodepool-rdo.yaml \
monitoring/prometheus.yaml \
monitoring/rules-afs.yaml \
monitoring/rules-backup.yaml \
monitoring/rules-dlrn.yaml \
monitoring/rules-http.yaml \
monitoring/rules-node.yaml \
monitoring/rules-ibm-instances.yaml \
monitoring/rules-node_proxy.yaml \
monitoring/rules-nodepool.yaml \
monitoring/rules-systemd.yaml \
monitoring/rules-zuul.yaml \
monitoring/rules-mysqld.yaml \
monitoring/rules-openstack-check.yaml \
monitoring/rules-es-check.yaml \
monitoring/rules-system-updates.yaml \
monitoring/rules-k1s-zombie-containers.yaml \
playbooks/host_vars/monitoring.softwarefactory-project.io.yaml \
playbooks/host_vars/backup.rdoproject.org.yaml
DASHBOARDS = roles/sf/grafana/files/infra/DLRN.json \
roles/sf/grafana/files/infra/EodBackstage.json
ANSIDHALL = roles/acme-tiny/tasks/main.yaml
all: dhall-version-check dhall-inventory $(DASHBOARDS) $(MANAGED)
@dhall to-directory-tree --output . <<< ./vars/directory-tree.dhall
%.json: %.dhall .FORCE
@dhall-to-json --explain --file $< --output $@
.FORCE:
%.yaml: %.dhall .FORCE
@sh -c "echo '# Code generated by dhall-to-yaml. DO NOT EDIT.'; env DHALL_INFRA=$$(pwd)/package.dhall dhall-to-yaml --explain --file $<" > $@
dhall-inventory:
@dhall-to-json --file ansible/hosts.dhall | python3 scripts/gen_inventory.py | json-to-dhall | dhall-to-yaml > ansible/hosts.yaml
dhall-format:
@find . -name "*.dhall" -exec dhall --ascii format --inplace {} \;
dhall-version-check:
@sh -c 'test 103199 -lt $$(dhall --version | sed "s/\./0/g") || (echo -e "You need dhall version >= 1.32.0, please update by running:\n sudo dnf install -y dhall dhall-json"; exit 1)'