forked from Aaron-K-T-Berry/packer-ubuntu-proxmox-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
37 lines (28 loc) · 877 Bytes
/
Taskfile.yml
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
# https://taskfile.dev
version: "2"
vars:
config_path: ./ubuntu-18.04.json
# Configure your var paths here with the `-var-file="./path/file.json" flag`
# or any other packer options you need to pass into commands
packer_args: '-var-file="./config.json"'
ubuntu_18_04_iso_name: ubuntu-18.04.4-server-amd64.iso
ubuntu_18_04_iso_url: http://cdimage.ubuntu.com/releases/18.04/release/ubuntu-18.04.4-server-amd64.iso
tasks:
init:
cmds:
- cp ./example-vars.json ./config.json
status:
- test -f config.json
build:
cmds:
- packer build {{.packer_args}} {{.config_path}}
validate:
cmds:
- packer validate {{.packer_args}} {{.config_path}}
cleanup-isos:
cmds:
- rm -rf ./isos
ubuntu-18-iso:
cmds:
- mkdir -p ./isos
- curl -C - -o ./isos/{{.ubuntu_18_04_iso_name}} {{.ubuntu_18_04_iso_url}}