Install debian with packer. After installation, the postinstall.sh script should work. But it does not work, because after the first launch, the system asks for a username and password. Maybe I did not add something in the .json file? Fragment of json file:
............. "ssh_username": "user", "ssh_password": "user", "ssh_port": 22, ............. } } ] } ], "provisioners": { "type": "shell", "script": [ "postinstall.sh", "apt-get -y install mc" }, ] } Script:
apt-get update apt-get -y install mc Another way is to write in json like this:
"provisioners": { "type": "shell", "inline": [ "apt-get update", "apt-get -y install mc" But also does not work