Remove hardcoded user in packer provisionning
This commit is contained in:
parent
854982082a
commit
1f06ba238f
@ -52,7 +52,7 @@ define OPACK_PACKER_CLOUD_CONTENT =
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"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": [ [
|
"post-processors": [ [
|
||||||
|
@ -48,7 +48,7 @@ define OPACK_PACKER_CONTENT =
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"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": [ [
|
"post-processors": [ [
|
||||||
|
Loading…
Reference in New Issue
Block a user