From 1f06ba238f0f304324065be06cd670d9bb3b40e5 Mon Sep 17 00:00:00 2001 From: Samuel Aubertin Date: Mon, 9 Oct 2023 12:21:07 +0200 Subject: [PATCH] Remove hardcoded user in packer provisionning --- src/packerfile-gcp.mk | 2 +- src/packerfile.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/packerfile-gcp.mk b/src/packerfile-gcp.mk index 3ec5a60..de5742c 100644 --- a/src/packerfile-gcp.mk +++ b/src/packerfile-gcp.mk @@ -52,7 +52,7 @@ define OPACK_PACKER_CLOUD_CONTENT = }, { "type": "shell", - "inline": ["cp /root/.ssh/authorized_keys /home/opack/.ssh/authorized_keys; chown opack /home/opack/.ssh/authorized_keys"] + "inline": ["cp /root/.ssh/authorized_keys /home/$(OPACK_SYS_USER)/.ssh/authorized_keys; chown $(OPACK_SYS_USER) /home/$(OPACK_SYS_USER)/.ssh/authorized_keys"] } ], "post-processors": [ [ diff --git a/src/packerfile.mk b/src/packerfile.mk index 6d3ea46..9794f9c 100644 --- a/src/packerfile.mk +++ b/src/packerfile.mk @@ -48,7 +48,7 @@ define OPACK_PACKER_CONTENT = }, { "type": "shell", - "inline": ["cp /root/.ssh/authorized_keys /home/opack/.ssh/authorized_keys; chown opack /home/opack/.ssh/authorized_keys"] + "inline": ["cp /root/.ssh/authorized_keys /home/$(OPACK_SYS_USER)/.ssh/authorized_keys; chown $(OPACK_SYS_USER) /home/$(OPACK_SYS_USER)/.ssh/authorized_keys"] } ], "post-processors": [ [