summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index e878aac..d90188c 100644
--- a/Makefile
+++ b/Makefile
@@ -120,13 +120,19 @@ endif
help:
-# Creating base images
+# Creating base images. Initially clone the openslx dracut module repository
+# if 'boot' was part of the main target
$(BASETARGETS):
$(info ** Building template '$(@D)' using '$(BUILDER)' **)
+ $(eval INIT_TAG := $(if $(filter boot,$(notdir $(MAKECMDGOALS))),\
+ install,\
+ untagged))
$(PACKER) build -only=$(BUILDER) \
$(PACKER_OPTS) \
-var='vm_name=rootfs-image' \
-var='output_directory=$(@D)/base' \
+ -var='playbook=$(ANSIBLE_DIR)/slx-builder.yml' \
+ -var='extra_ansible_args=-t,$(INIT_TAG)' \
$(@D).json
@echo "$(ROOTPW)" | $(HASHER) > $(@D)/base/rootpw.$(HASHER)
@@ -144,8 +150,8 @@ $(foreach flav, $(FLAVORS), %/$(flav)): %/base
-var='vm_name=rootfs-image' \
-var='output_directory=$(BUILD_DIR)/build' \
-var='base_image=$(@D)/base/rootfs-image' \
- -var='playbook=setup-$(@F).yml' \
- $(BUILD_DIR)/$(ANSIBLE_DIR)/run-playbook-only.json
+ -var='playbook=$(BUILD_DIR)/$(ANSIBLE_DIR)/setup-$(@F).yml' \
+ ansible-provisioner.json
# Generating boot files
@@ -163,8 +169,9 @@ $(BOOTTARGETS):
-var='vm_name=rootfs-image.tmp' \
-var='output_directory=$(BUILD_DIR)/tmp' \
-var='base_image=$(BUILD_DIR)/rootfs-image' \
- -var='playbook=build-dracut-initramfs.yml' \
- $(ANSIBLE_DIR_CUR)/run-playbook-only.json
+ -var='playbook=$(ANSIBLE_DIR)/slx-builder.yml' \
+ -var="extra_ansible_args=-t,install,-t,build" \
+ ansible-provisioner.json
@mv $(ANSIBLE_DIR_CUR)/boot_files $(BUILD_DIR)/boot
$(if $(DEBUG),,@rm -rf $(BUILD_DIR)/tmp)