Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Conversation

@q0rban
Copy link

@q0rban q0rban commented Sep 9, 2019

Initially running vagrant up gave me the following error:

 drupal-cms: Installing pip... (for Ansible installation) The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! pip install --upgrade ansible Stdout from the command: Stderr from the command: bash: line 5: pip: command not found 

This led me to hashicorp/vagrant#9584 and hashicorp/vagrant#10950 (comment). The following change fixed it for me.

@AlannaBurke
Copy link

I had the same issue and this change fixed it for me!

@geerlingguy
Copy link
Owner

I do not want to maintain a hotfix for a Vagrant bug in Drupal VM, especially one that sudo bash's a downloaded file—see #1944

Basically, for now, you can either downgrade to Vagrant 2.2.4, or use the same fix in a Vagrantfile.local to resolve this issue if you have to run Vagrant 2.2.5.

@q0rban
Copy link
Author

q0rban commented Sep 13, 2019

Thanks @geerlingguy! I tried to do something similar in Vagrantfile.local and couldn't figure it out. Could you elaborate?

@q0rban
Copy link
Author

q0rban commented Sep 13, 2019

Also, regarding:

especially one that sudo bash's a downloaded file

Giving this a closer read hashicorp/vagrant#9584:

  1. Vagrant's ansible does the "sudo bash" to install pip. The "bug" in this case seems to be that "ansible_local installs pip before it installs ansible"
  2. @gildegoma says the reporter did, "the right thing [by] implementing your own ansible setup via a shell provisioner"
  3. @gildegoma then proposes as a fix to, "introduce a new pip_install_command option, with
    "curl https://bootstrap.pypa.io/get-pip.py | sudo python" as default."

To be clear, I'm all in favor of avoiding scripts piped to bash, but if I'm understanding, it seems avoiding that would mean writing your own ansible installer.

Perhaps a route forward for DrupalVM is here:

you can extend your shell provisioner to also install ansible, and then configure the ansible_local provisioner to not install ansible by setting the install option to false.

@q0rban
Copy link
Author

q0rban commented Nov 6, 2019

Thoughts on the above @geerlingguy ?

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

Labels

None yet

3 participants