Multiple Errors on 'vagrant up' - Ansible Tasks failing

Hi,
First time Trellis user.
Trying to install the dev env’ and when I run the ‘vagrant up’ command I get the messages below…

Vagrant Up Error:

TASK [sshd : ensure ssh server is installed] ***********************************
System info:
  Ansible 2.0.2.0; Darwin
  Trellis at "Require Ansible 2.0.2 and remove deploy_helper"
---------------------------------------------------
Could not fetch updated apt files
fatal: [default]: FAILED! => {"changed": false, "failed": true}

NO MORE HOSTS LEFT *************************************************************

RUNNING HANDLER [fail2ban : restart fail2ban] **********************************
changed: [default]

RUNNING HANDLER [ferm : restart ferm] ******************************************
skipping: [default]

RUNNING HANDLER [ntp : restart ntp] ********************************************
changed: [default]
	to retry, use: --limit @/Users/rontal/Sites/places-to-eat-near-me.com/trellis/dev.retry

PLAY RECAP *********************************************************************
default                    : ok=21   changed=12   unreachable=0    failed=1   

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

TASK [sshd : ensure ssh server is installed] ***********************************
System info:
  Ansible 2.0.2.0; Darwin
  Trellis at "Require Ansible 2.0.2 and remove deploy_helper"
---------------------------------------------------
Could not fetch updated apt files
fatal: [default]: FAILED! => {"changed": false, "failed": true}

NO MORE HOSTS LEFT *************************************************************

RUNNING HANDLER [fail2ban : restart fail2ban] **********************************
changed: [default]

RUNNING HANDLER [ferm : restart ferm] ******************************************
skipping: [default]

RUNNING HANDLER [ntp : restart ntp] ********************************************
changed: [default]
	to retry, use: --limit @/Users/rontal/Sites/places-to-eat-near-me.com/trellis/dev.retry

PLAY RECAP *********************************************************************
default                    : ok=21   changed=12   unreachable=0    failed=1   

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

Now I get this one:

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"], "msg": "No package matching 'build-essential' is available"}

NO MORE HOSTS LEFT *************************************************************
	to retry, use: --limit @/Users/rontal/Sites/places-to-eat-near-me.com/trellis/dev.retry

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

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

solved by adding missing GBG keys manually via ssh in the machine…
e.g.:


But now facing new error with MariaDB:

failed: [default] (item=deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main) => {"failed": true, "item": "deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main", "module_stderr": "", "module_stdout": "\r\nTraceback (most recent call last):\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1465045698.59-199587668698667/apt_repository\", line 3322, in <module>\r\n    main()\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1465045698.59-199587668698667/apt_repository\", line 471, in main\r\n    cache.update()\r\n  File \"/usr/lib/python2.7/dist-packages/apt/cache.py\", line 440, in update\r\n    raise FetchFailedException(e)\r\napt.cache.FetchFailedException: W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release  Unable to find expected entry 'restricted/source/Sources' in Release file (Wrong sources.list entry or malformed file)\r\n, E:Some index files failed to download. They have been ignored, or old ones used instead.\r\n", "msg": "MODULE FAILURE", "parsed": false}
failed: [default] (item=deb-src http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main) => {"failed": true, "item": "deb-src http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main", "module_stderr": "", "module_stdout": "\r\nTraceback (most recent call last):\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1465045703.28-47489071421528/apt_repository\", line 3322, in <module>\r\n    main()\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1465045703.28-47489071421528/apt_repository\", line 471, in main\r\n    cache.update()\r\n  File \"/usr/lib/python2.7/dist-packages/apt/cache.py\", line 440, in update\r\n    raise FetchFailedException(e)\r\napt.cache.FetchFailedException: W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release  Unable to find expected entry 'restricted/source/Sources' in Release file (Wrong sources.list entry or malformed file)\r\n, E:Some index files failed to download. They have been ignored, or old ones used instead.\r\n", "msg": "MODULE FAILURE", "parsed": false}

solved the above, now failing on:

TASK [mariadb : Install MySQL client] ******************************************
System info:
  Ansible 2.0.2.0; Darwin
  Trellis at "Require Ansible 2.0.2 and remove deploy_helper"
---------------------------------------------------
'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options
::=--force-confold"   install 'mariadb-client'' failed: E: Unable to correct
problems, you have held broken packages.

E: Unable to correct problems, you have held broken packages.

fatal: [default]: FAILED! => {"cache_update_time": 0, "cache_updated": false, "changed": false, "failed": true, "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n mariadb-client : Depends: mariadb-client-10.0 (= 10.0.25+maria-1~trusty) but it is not going to be installed\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Some packages could not be installed. This may mean that you have", "requested an impossible situation or if you are using the unstable", "distribution that some required packages have not yet been created", "or been moved out of Incoming.", "The following information may help to resolve the situation:", "", "The following packages have unmet dependencies:", " mariadb-client : Depends: mariadb-client-10.0 (= 10.0.25+maria-1~trusty) but it is not going to be installed"]}

You’re running into a lot of issues that shouldn’t be happening and I think your vagrant machine has gotten into a “broken” state. I’d suggest running vagrant destroy and starting again.

Occasionally there’s connection issues with apt but it’s just a matter of retrying again.