Vagrant up failing at: TASK [common : Checking essentials]

I’ve been really enjoying working with Trellis/Sage and have really picked up a lot of good development practices from it. Thanks to all the folks who’ve made this possible!

Everything has been going well, but yesterday, after updating Vagrant to 1.8.4, when provisioning I get stuck at the following:

TASK [common : Checking essentials] ******************************************** failed: [default] (item=[u'python-software-properties', u'python-pycurl', u'build-essential', u'python-mysqldb', u'curl', u'git-core', u'dbus']) => {"failed": true, "item": ["python-software-properties", "python-pycurl", "build-essential", "python-mysqldb", "curl", "git-core", "dbus"], "module_stderr": "", "module_stdout": "Traceback (most recent call last):\r\n File \"/home/vagrant/.ansible/tmp/ansible-tmp-1466294453.75-101792211999455/apt\", line 2441, in <module>\r\n main()\r\n File \"/home/vagrant/.ansible/tmp/ansible-tmp-1466294453.75-101792211999455/apt\", line 433, in main\r\n packages = p['package'].split(',')\r\nAttributeError: 'list' object has no attribute 'split'\r\n", "msg": "MODULE FAILURE", "parsed": false}

I updated Trellis to the latest version, as well as VirtualBox, and also Ansible to 2.0.2.0. I tried to destroy and re-provision the server to no effect. After searching the forums, I haven’t been able to find any clues as to why this is happening.

Any insights would be greatly appreciated.

Thank You,

Tak

This seems obscure (read “frustrating”). You might try vagrant box update but I’m guessing you’re already on the latest.

If that doesn’t resolve it, see if these steps seem appropriate and worth trying.

Hmm, I tried destroying the machine and running vagrant box update but, haven’t had any luck. Also tried the suggestions in the link running sudo apt-get update but that hasn’t helped either. Maybe I’ll just try to uninstall everything and start over?

The Trellis docs have been updated with the correct Vagrant version requirements. Downgrading to 1.8.1 should fix this issue for now.

Thank you for the update. Any idea when Trellis will support the latest version of Vagrant? I’m also running another VM to develop Drupal sites which requires 1.8.4.

We’re waiting on Vagrant not the other way around :slight_smile:

1 Like

Hmm, I downgraded to Vagrant 1.8.1, but still getting the an error at the same stage:

TASK [common : Checking essentials] ******************************************** failed: [default] (item=[u'python-software-properties', u'python-pycurl', u'build-essential', u'python-mysqldb', u'curl', u'git-core', u'dbus']) => {"failed": true, "item": ["python-software-properties", "python-pycurl", "build-essential", "python-mysqldb", "curl", "git-core", "dbus"], "module_stderr": "", "module_stdout": "Traceback (most recent call last):\r\n File \"/home/vagrant/.ansible/tmp/ansible-tmp-1467833305.65-56105563274875/apt\", line 2441, in <module>\r\n main()\r\n File \"/home/vagrant/.ansible/tmp/ansible-tmp-1467833305.65-56105563274875/apt\", line 433, in main\r\n packages = p['package'].split(',')\r\nAttributeError: 'list' object has no attribute 'split'\r\n", "msg": "MODULE FAILURE", "parsed": false}

Please try vagrant destroy && vagrant up to remove any traces of the previous bad provisioning.

Also tried vagrant destroy, vagrant box update, but didn’t change the outcome.

What are your Python and Ansible versions?

Ansible 2.0.2 and Python 2.7.5, running on Mac OS X 10.9.5.

Hmm, looks like a Python issue to me.

If you haven’t already worked through this thread, it might help. Item #3 “feels” most promising to me:

1 - indent these items two more spaces to be more like the with_items examples in Ansible docs. (credit)

2 - try setting squash_actions in your ansible.cfg, with and without apt (credit and some notes)

3 - clean out old versions of Ansible to avoid running out-of-date modules (helpful command and credit)

If these steps don’t resolve it, do some good searching/googling and debugging, and let us know what you’ve tried and discovered that seems most informative and promising. Maybe that will spark some ideas from forum members.

1 Like