diff options
author | Jonathan Bauer | 2018-02-07 18:09:06 +0100 |
---|---|---|
committer | Jonathan Bauer | 2018-02-07 18:09:06 +0100 |
commit | 76a494bcfc74539304dc21f99267329e7c9765b7 (patch) | |
tree | e8e13f29a76d559131e10825e9e45bd8a5faadea /Makefile | |
parent | Makefile: remove old/completed TODOs (diff) | |
download | packer-templates-76a494bcfc74539304dc21f99267329e7c9765b7.tar.gz packer-templates-76a494bcfc74539304dc21f99267329e7c9765b7.tar.xz packer-templates-76a494bcfc74539304dc21f99267329e7c9765b7.zip |
Makefile: small formatting changes
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -2,11 +2,8 @@ # TODO # * support ssh as user instead of root # * testing target -PACKER=packer -ANSIBLE_DIR=ansible-roles -# the "provisioning" flavor, expects a 'setup-<flavor>.yml' playbook -# in the 'ansible-roles' submodule! This will likely change... -FLAVORS := $(patsubst $(ANSIBLE_DIR)/setup-%.yml,%, $(wildcard $(ANSIBLE_DIR)/setup-*.yml)) +PACKER = packer +ANSIBLE_DIR = ansible-roles SUPPORTED_BUILDERS = qemu virtualbox-iso vmware-iso # check which hypervisors are available ifeq ($(shell which qemu-system-$(shell uname -m | sed 's/i686/i386/') 2>&1 > /dev/null && echo $$?), 0) @@ -35,7 +32,13 @@ ifneq ($(words $(MISSING_BUILDERS)), 0) $(info ) endif +## +# Templates and flavors detection +## +# The packer templates, detected as *.json (excluding base.json) TEMPLATES := $(basename $(filter-out base.json,$(wildcard *.json))) +# The provisioning flavors, detected as ansible-roles/setup-<flavor>.yml +FLAVORS := $(patsubst $(ANSIBLE_DIR)/setup-%.yml,%, $(wildcard $(ANSIBLE_DIR)/setup-*.yml)) BASETARGETS := $(foreach template, $(TEMPLATES), $(template)/base) PROVTARGETS := $(foreach template, $(TEMPLATES), $(foreach flavor, $(FLAVORS), $(template)/$(flavor))) |