diff options
author | Jonathan Bauer | 2018-08-21 17:33:50 +0200 |
---|---|---|
committer | Jonathan Bauer | 2018-08-21 17:33:50 +0200 |
commit | 2f2e336892d401954ce491663f6b8246bac03388 (patch) | |
tree | 7eef72aefd5c4311a0f70949949956c581faf906 /Makefile | |
parent | [centos-7] add support for bootstrapping dracut environment (diff) | |
download | packer-templates-2f2e336892d401954ce491663f6b8246bac03388.tar.gz packer-templates-2f2e336892d401954ce491663f6b8246bac03388.tar.xz packer-templates-2f2e336892d401954ce491663f6b8246bac03388.zip |
Makefile: add support for bootstrapping dracut env
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -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) |