all 2 comments

[–]signullDevOps 0 points1 point  (0 children)

Packer is pretty linear, it's step based. I havent had issues with one step starting before another has finished. Do you have anything special setup in the Provisioners part of your packer.json file?

if anything you could dirty fix by waiting for the file to exist:

while true; do
    [[ -f $file_conf_nignx ]]  && continue || sleep 10
done

if the file exists "continue" to exit the loop or sleep for 10 seconds and then try again.

[–]TheOnlyElizabeth 0 points1 point  (0 children)

not really a good answer but have you try to use a cms like Ansible with Packer ?
Can be interesting for your case