commit 02a363aa059834e21b1025b87496521d42615751
parent 709994ab1c37165728d32cb0ad03d33b156b91d6
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date: Fri, 11 Oct 2024 19:31:52 +0200
feat(haproxy): convert json to hcl
Diffstat:
2 files changed, 24 insertions(+), 26 deletions(-)
diff --git a/haproxy-lxc.json b/haproxy-lxc.json
@@ -1,26 +0,0 @@
-{
- "variables": {
- "manifest": "manifest.json"
- },
- "builders": [
- {
- "type": "lxc",
- "name": "haproxy",
- "config_file": "config/lxc-config",
- "template_name": "download",
- "template_parameters": ["--dist", "Debian_by_maurer", "--release", "Bookworm", "--arch", "armv7l"]
- }
- ],
- "provisioners": [
- {
- "type": "shell",
- "script": "scripts/timezone.sh"
- },
- {
- "type": "shell",
- "script": "scripts/haproxy.sh",
- "environment_vars": [
- ]
- }
- ]
-}
diff --git a/haproxy-lxc.json.pkr.hcl b/haproxy-lxc.json.pkr.hcl
@@ -0,0 +1,24 @@
+
+variable "manifest" {
+ type = string
+ default = "manifest.json"
+}
+
+source "lxc" "haproxy" {
+ config_file = "config/lxc-config"
+ template_name = "download"
+ template_parameters = ["--dist", "Debian_by_maurer", "--release", "Bookworm", "--arch", "armv7l"]
+}
+
+build {
+ sources = ["source.lxc.haproxy"]
+
+ provisioner "shell" {
+ script = "scripts/timezone.sh"
+ }
+
+ provisioner "shell" {
+ script = "scripts/haproxy.sh"
+ }
+
+}