Browse Source

Initial commit

eole
William Petit 2 years ago
commit
921219fa27
4 changed files with 34 additions and 0 deletions
  1. 2
    0
      .editorconfig
  2. 2
    0
      .gitignore
  3. 21
    0
      Makefile
  4. 9
    0
      ubuntu/xenial/packer.json

+ 2
- 0
.editorconfig View File

@@ -0,0 +1,2 @@
1
+[Makefile]
2
+indent_style=tab

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
1
+/packer.zip
2
+/.bin

+ 21
- 0
Makefile View File

@@ -0,0 +1,21 @@
1
+packer_version = 1.0.3
2
+packer_arch = amd64
3
+packer_archive_shasum = 0e10169ef9cf3fd55dcc9dc213b9995170f7712e8a162ca2f5109d62bfbe7529
4
+recipes = ubuntu/xenial/packer.json ubuntu/test/packer.json
5
+
6
+build: $(recipes)
7
+
8
+$(recipes):
9
+	PATH=.bin:$$PATH packer build $@
10
+
11
+install-packer: .bin/packer
12
+
13
+packer.zip:
14
+	wget -O- https://releases.hashicorp.com/packer/$(packer_version)/packer_$(packer_version)_linux_$(packer_arch).zip > packer.zip
15
+	echo "$(packer_archive_shasum) packer.zip" | sha256sum -c
16
+
17
+.bin/packer: packer.zip
18
+	mkdir -p .bin
19
+	unzip -o -d .bin packer.zip
20
+
21
+.PHONY: $(recipes)

+ 9
- 0
ubuntu/xenial/packer.json View File

@@ -0,0 +1,9 @@
1
+{
2
+  "builders": [
3
+    {
4
+      "type": "qemu",
5
+      "iso_url": "http://mirror.raystedman.net/centos/6/isos/x86_64/CentOS-6.8-x86_64-minimal.iso",
6
+      "iso_checksum": "0ca12fe5f28c2ceed4f4084b41ff8a0b"
7
+    }
8
+  ]
9
+}

Loading…
Cancel
Save