mpdehaan requested in ansible/ansible#795 that globals be removed. The response was to remove the lines with the word 'global', but not the actual use of global variables. Which makes the module break silently. Updated to use local variables.