drupal-vm icon indicating copy to clipboard operation
drupal-vm copied to clipboard

Provisioning failing during TASK [Get software for Python-based control.]

Open ghost opened this issue 10 years ago • 17 comments

I have one Windows 7 machine that is giving me problems getting Drupal VM running.

I've updated the box via vagrant box update I've updated Ansible inside the VM using sudo pip install ansible --upgrade sudo ansible-galaxy install -r provisioning/requirements.yml --force

I destroyed the VM and tried again and continue to get hung up at during vagrant provision: ==> WebNY: TASK [Get software for Python-based control.] ********************************** ==> WebNY: An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'list' object has no attribute 'split' ==> WebNY: failed: [localhost] => (item=[u'curl', u'python-apt', u'python-pycurl', u'build-essential']) => {"failed": true, "item": ["curl", "python-apt", "python-pycurl", "build-essential"], "parsed": false} ==> WebNY: to retry, use: --limit @/vagrant//provisioning/playbook.retry ==> WebNY:

Not sure what to try next to solve the issue.

ghost avatar Mar 07 '16 12:03 ghost

I seem to remember seeing this error once before, but no clue when it happened or how it was fixed (probably just a destroy and up again)... have you been able to try that?

Also, what version of ansible is installed? 2.0.1 or something else? And maybe make sure Drupal VM itself is up to date if everything else is up to date as well.

geerlingguy avatar Mar 21 '16 01:03 geerlingguy

Have you been able to get past this particular issue? It sounds like either one of the roles is out of date, or Ansible is out of date.

geerlingguy avatar Apr 04 '16 22:04 geerlingguy

I'm getting this issue right now on OS X.

Ansible: 2.0.1.0 Vagrant: 1.8.1 Virtualbox: 5.0.16 drupal-vm: master branch just pulled

scottatdrake avatar Apr 05 '16 14:04 scottatdrake

@scottatdrake - Are you on windows as well, or on a different platform?

Also, have you run: sudo ansible-galaxy install -r provisioning/requirements.yml --force ?

geerlingguy avatar Apr 05 '16 14:04 geerlingguy

@geerlingguy I'm on OS X and yes, have run sudo ansible-galaxy install -r provisioning/requirements.yml --force. Doing a vagrant destroy and vagrant up hasn't seemed to help.

scottatdrake avatar Apr 05 '16 14:04 scottatdrake

Okay, I just got by the point that was hanging. It seemed like the previous task (apt cache update) was taking a long time, as well. So, I did a vagrant ssh followed by sudo apt-get update, exited, then tried vagrant provision again. I have no idea if that fixed the issue, or if perhaps there was just some sort of connectivity problem, but it seems to be working now. ¯(ツ)/¯

scottatdrake avatar Apr 05 '16 15:04 scottatdrake

Had the same issue and did what @scottatdrake did with one minor variation/addition:

  1. vagrant ssh into the box
  2. sudo apt-get update revealed a need to run sudo dpkg --configure -a.
  3. so, ran sudo dpkg --configure -a
  4. exit VM
  5. vagrant provision
  6. Success!

chrisrikli avatar Apr 16 '16 13:04 chrisrikli

Odd... I guess we'll just keep that as the official answer to whatever this problem may be. I'm guessing networking, something with the repos, who knows!

Thanks for posting what worked!

geerlingguy avatar May 11 '16 04:05 geerlingguy

Hi,

I have the exaclty same problem on Ubuntu 14.4. I tried to do what @chrisrikli said, but I still have the problem.

Vagrant 1.8.1 ansible 2.0.1.0 drupalvm : up to date

failed: [d8vm] => (item=[u'curl', u'python-apt', u'python-pycurl', u'build-essential', u'sudo', u'unzip']) => {"failed": true, "item": ["curl", "python-apt", "python-pycurl", "build-essential", "sudo", "unzip"], "module_stderr": "", "module_stdout": "Traceback (most recent call last):\r\n File "/home/vagrant/.ansible/tmp/ansible-tmp-1467205106.47-165261602526287/apt", line 2432, in \r\n main()\r\n File "/home/vagrant/.ansible/tmp/ansible-tmp-1467205106.47-165261602526287/apt", line 448, in main\r\n packages = p['package'].split(',')\r\nAttributeError: 'list' object has no attribute 'split'\r\n", "msg": "MODULE FAILURE", "parsed": false} to retry, use: --limit @/media/hdd/Developpement/vagrant/d8vm/provisioning/playbook.retry Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again.

joelrotelli avatar Jun 29 '16 13:06 joelrotelli

@joelrotelli - Can you update to the latest version of Ansible (I believe 2.1.0)?

geerlingguy avatar Jun 29 '16 15:06 geerlingguy

Indeed, by 2.0.1.0 I read 2.1.0.0. :)))

So now I have the latest version but I have this error :

TASK [Install extra apt packages (if any are configured).] ********************* fatal: [d8vm]: FAILED! => {"failed": true, "msg": "Unexpected templating type error occurred on ({{ extra_packages | list }}): 'NoneType' object is not iterable"} to retry, use: --limit @/media/hdd/Developpement/vagrant/d8vm/provisioning/playbook.retry

PLAY RECAP ********************************************************************* d8vm : ok=158 changed=3 unreachable=0 failed=1

Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again.

joelrotelli avatar Jun 29 '16 19:06 joelrotelli

@joelrotelli - What do you have extra_packages set to? If you don't want any packages, it has to be set to an empty set:

extra_packages: []

If you just comment out all the lines below, then it will be an empty string instead of an array, and the | list call fails on it, causing that iterable error.

geerlingguy avatar Jun 29 '16 20:06 geerlingguy

You're right, thanks a lot !

joelrotelli avatar Jun 29 '16 20:06 joelrotelli

I'm having this same issue. I'm trying to use a Parallels VM box (parallels/ubuntu-14.04) though. Not sure if the matters.

joelrossol avatar Nov 18 '16 22:11 joelrossol

@jrossol - What versions of VirtualBox and Vagrant are you running?

geerlingguy avatar Nov 18 '16 23:11 geerlingguy

I too am having similar issue

TASK [Install extra apt packages (if any are configured).] *********************

failed: [my_site] (item=[u'extra_packages | list']) => {"failed": true, "item": ["extra_packages | list"], "msg": "No package matching 'extra_packages | list' is available"}

nehajyoti04 avatar Nov 29 '16 15:11 nehajyoti04

@nehajyoti04 - In your config.yml, make sure you set extra_packages: [] for that variable (if you don't want any extra packages installed.

Also, make sure you have Ansible 2.2 or later.

geerlingguy avatar Nov 29 '16 16:11 geerlingguy