Packer builds stops waiting for interactive input

Hi!

When building an image for DigitalOcean, the packer stops with this message waiting for the input:

A new version (/tmp/file1w2eLx) of configuration file /etc/ssh/sshd_config is
available, but the version installed currently has been locally modified.

  1. install the package maintainer's version
  2. keep the local version currently installed
  3. show the differences between the versions
  4. show a side-by-side difference between the versions
  5. show a 3-way difference between available versions
  6. do a 3-way merge between available versions
  7. start a new shell to examine the situation

Is there an option or some other way to provide this input?
Or is there maybe some other solution to this problem?

Thank you!

Depending on the package manager the instance is using (yum, apt, etc), it should be able to set an environment variable in the provisioner to state that the process is not interactive. For example if it’s apt-based, you can set DEBIAN_FRONTEND=noninteractive.

See the man page for options.

This environment variable can be set via Packer depending on which provisioner you’re using.

You are the saviour - thank you - I’ve been looking for an answer for couple hours before coming here!

It’s apt-based indeed and this environment variable worked.

1 Like