Contributing and Releasing Vagrant Hosts Updater 1.0! oops 1.0.1

At LPi we extensively use open source tools in our daily development cycle. One of the tools that I have personally grown to love is vagrant hosts-updater plugin. I reached out the original developer to see how I could help out and ended up becoming a contributor and project maintainer.

Continue reading “Contributing and Releasing Vagrant Hosts Updater 1.0! oops 1.0.1”

Vagrant/Ansible causing ‘Too many authentication failures’

You might run into an SSH error that seems vague.  Here is the error

SSH Error: Received disconnect from 2: Too many authentication failures for vagrant while connecting to

Your error will vary on port and IP address but it is all the same.  Here is how you fix it.

Create a file called `ansible.cfg` in the same directory as your Vagrantfile. Add the following to the ansible.cfg file:

ssh_args = -o IdentitiesOnly=yes

That is it.  Now when you run `vagrant provision` you will see that Ansible has the correct settings to connect to the VM and provision the box.  You won’t need to do this when Vagrant 1.7.3 is released because they addressed this issue in the code.

Update 5/28/2015:

I found that making this small change allows host keys to also be checked.  Definitely a RTFM moment.  Still waiting for the 1.7.3 release to assist with too many identities.

ansible.host_key_checking = true

How to refactor a house of cards

Shuffling Cards - WikiMedia CommonsI was recently brought on board to assist in refactoring a legacy PHP application.  I have to be honest, seeing this code base made me want to start from a clean slate.  I’ve refactored a lot of applications over the years and have never blown any of them to bits.  This one was tempting me to do that.  It is truly a house of cards.

Unfortunately, this particular code base started violating object oriented principles before the universe knew what objects were.  It is bad.  If you are in a similar situation you are wondering the same thing as I am: what do I do first without breaking this?

Continue reading “How to refactor a house of cards”