From b7d43c5eae4867cc7d8058bf96e7736b1d636cd3 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 20 Jul 2020 13:09:26 -0700 Subject: [PATCH] Add --force-yes to apt commands (#59557) We use -y to automate apt install commands within vagrant provisioning. However, this is sometimes insufficient, for example when a gpg signature signing the package expires. This commit adds the extra --force-yes flag, to tell apt-get we really mean business. closes #59495 --- Vagrantfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index c9f96549d45..d7ff25a6a74 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -189,7 +189,7 @@ def deb_common(config, name, extra: '') name, update_command: 'apt-get update', update_tracking_file: '/var/cache/apt/archives/last_update', - install_command: 'apt-get install -y', + install_command: 'apt-get install -y --force-yes', extra: extra_with_lintian ) end @@ -197,7 +197,7 @@ end def ubuntu_docker(config) config.vm.provision 'install Docker using apt', type: 'shell', inline: <<-SHELL # Install packages to allow apt to use a repository over HTTPS - apt-get install -y \ + apt-get install -y --force-yes \ apt-transport-https \ ca-certificates \ curl \ @@ -215,7 +215,7 @@ def ubuntu_docker(config) # Install Docker. Unlike Fedora and CentOS, this also start the daemon. apt-get update - apt-get install -y docker-ce docker-ce-cli containerd.io + apt-get install -y --force-yes docker-ce docker-ce-cli containerd.io # Add vagrant to the Docker group, so that it can run commands usermod -aG docker vagrant @@ -230,7 +230,7 @@ end def deb_docker(config) config.vm.provision 'install Docker using apt', type: 'shell', inline: <<-SHELL # Install packages to allow apt to use a repository over HTTPS - apt-get install -y \ + apt-get install -y --force-yes \ apt-transport-https \ ca-certificates \ curl \ @@ -248,7 +248,7 @@ def deb_docker(config) # Install Docker. Unlike Fedora and CentOS, this also start the daemon. apt-get update - apt-get install -y docker-ce docker-ce-cli containerd.io + apt-get install -y --force-yes docker-ce docker-ce-cli containerd.io # Add vagrant to the Docker group, so that it can run commands usermod -aG docker vagrant