-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (30 loc) · 913 Bytes
/
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
.PHONY: install build vagrant-clean lint help
.NOTPARALLEL:
.POSIX:
.ONESHELL:
.DEFAULT_GOAL := help
SHELL := /bin/sh
define PRINT_HELP_PYSCRIPT
import re, sys
for line in sys.stdin:
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
if match:
target, help = match.groups()
print(f"{target:20s} {help}")
endef
export PRINT_HELP_PYSCRIPT
install: ## Install or update tools
scripts/install.sh
build: ## Packer build
rm -rf -- output-*
bin/packer build -force packer/template.pkr.hcl
lint: ## Lint Kickstart, Packer, and Ansible files
bin/packer validate packer/template.pkr.hcl
ksvalidator --followincludes --version F32 kickstart/ks.cfg
ansible-playbook playbooks/*.yml --syntax-check
# ansible-lint
vagrant-clean: ## Remove Vagrant images from KVM
bin/vagrant destroy -f
bin/vagrant provision
help: ## Print this help message
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)