Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

[setup-systemd-resolved] Installing dependencies apt-get: command not found #203

Open
reedlaw opened this issue Jan 13, 2021 · 1 comment

Comments

@reedlaw
Copy link

reedlaw commented Jan 13, 2021

When running from https://github.com/hashicorp/terraform-aws-vault on Amazon Linux 2 I get this error:

==> amazon-linux-2-ami: 2021-01-13 22:43:32 [INFO] [setup-systemd-resolved] Configuring systemd-resolved
==> amazon-linux-2-ami: 2021-01-13 22:43:32 [INFO] [setup-systemd-resolved] Installing dependencies
==> amazon-linux-2-ami: sudo: apt-get: command not found

It's due to a lack of call to has_apt_get or similar function inside setup-systemd-resolved's install_dependencies function:

function install_dependencies {
  local -r consul_ip="$1"

  log_info "Installing dependencies"
  sudo apt-get update -y
  echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections
  echo iptables-persistent iptables-persistent/autosave_v6 boolean true | sudo debconf-set-selections
  sudo apt-get install -y iptables-persistent
}
@brikis98
Copy link
Collaborator

Ah, good catch. Thanks for reporting!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants