init
This commit is contained in:
24
makefiles/02_create_vms.mk
Normal file
24
makefiles/02_create_vms.mk
Normal file
@@ -0,0 +1,24 @@
|
||||
SHELL := /bin/bash
|
||||
.ONESHELL:
|
||||
.SHELLFLAGS := -eu -o pipefail -c
|
||||
|
||||
MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
ANSIBLE_DIR := $(abspath $(MAKEFILE_DIR)/../ansible)
|
||||
TERRAFORM_DIR := $(abspath $(MAKEFILE_DIR)/../terraform/stacks/proxmox/vm)
|
||||
|
||||
.PHONY: all \
|
||||
enable_snippets create_vms
|
||||
|
||||
all: create_vms
|
||||
|
||||
enable_snippets:
|
||||
cd "$(ANSIBLE_DIR)"
|
||||
ansible-playbook "playbooks/proxmox/enable_snippets.yml" -i "inventory.ini"
|
||||
|
||||
create_vms: enable_snippets
|
||||
cd "$(TERRAFORM_DIR)"
|
||||
terraform init
|
||||
terraform plan -var-file="terraform.tfvars"
|
||||
terraform apply -auto-approve -var-file="terraform.tfvars"
|
||||
|
||||
# make -f 02_create_vms.mk
|
||||
Reference in New Issue
Block a user