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

Commit

Permalink
Merge pull request #213 from yardbirdsax/bug/210
Browse files Browse the repository at this point in the history
Fix for #210: can't find Consul binary when executing through Packer
  • Loading branch information
brikis98 authored Apr 2, 2021
2 parents 0257e95 + eb3f2ec commit dfcc4b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/install-consul/install-consul
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ function install {
install_tls_certificates "$path" "$user" "$ca_file_path" "$cert_file_path" "$key_file_path"
fi

if command -v consul; then
# This command is run with sudo rights so that it will succeed in cases where image hardening alters the permissions
# on the directories where Consul may be installed. See https://github.com/hashicorp/terraform-aws-consul/issues/210.
if sudo -E PATH=$PATH bash -c "command -v consul"; then
log_info "Consul install complete!";
else
log_info "Could not find consul command. Aborting.";
Expand Down

0 comments on commit dfcc4b4

Please sign in to comment.