Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cfengine provisioner fails if redhat-like base box does not contain wget #7265

Closed
ghost opened this issue Apr 26, 2016 · 2 comments
Closed

Comments

@ghost
Copy link

ghost commented Apr 26, 2016

When installing CFengine into a Redhat-like guest operating system, the cfengine provisioner assumes that wget(1) is available. I at least one case, that is not so. When wget is not available, provisioning fails with an unhelpful error message.

Vagrant version

Vagrant 1.8.1

Host operating system

OSX

Guest operating system

CentOS

Vagrantfile

Vagrant.configure(2) do |config|
  config.vm.box = "centos/7"
  config.vm.box_version =  "1603.01"
  config.vm.provision "cfengine" do |cfengine|
    cfengine.am_policy_hub = true
  end
end

Debug output

https://gist.github.com/norcnorc/1ea514d23ed136fad89a4854cc77774e#file-cfengine-fail-log-L10161

Expected behavior

The latest version of the "cfengine-community" package is installed into the VM.

Actual behavior

Installation of the "cfengine-community" package fails with an error message about GPG keys.

==> default: Installing CFEngine onto machine...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

yum -y install cfengine-community

Stdout from the command:

Loaded plugins: fastestmirror


Stderr from the command:


You have enabled checking of packages via GPG keys. This is a good thing. 
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
    rpm --import public.gpg.key


Alternatively you can specify the url to the key you would like to use
for a repository in the 'gpgkey' option in a repository section and yum 
will install it for you.

For more information contact your distribution or package provider.

Problem repository: cfengine-repository

Steps to reproduce

  1. Run vagrant up

Workaround

Add the line

config.vm.provision "shell", inline: "yum install -y wget"

to the Vagrantfile, before the config.vm.provision "cfengine" line.

@chrisroberts chrisroberts added this to the 1.9 milestone Oct 3, 2016
@briancain
Copy link
Member

Because we can't address this for every dependency for each provider and provisioner, in this case it makes sense for the box maintainers to include wget on the box itself. Thanks!

@github-actions
Copy link

github-actions bot commented Jun 2, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 2, 2021
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

3 participants