Global name 'module" is not defined after upgrading to Ansible 2.0

This looks like you updated the main ansible from the git repo by not the modules. The combination of the devel branch git repo and old modules will give you this error.

We have some instructions about running from a git checkout here: http://docs.ansible.com/ansible/intro_installation.html#running-from-source the party that you’re probably missing is the git submodule update --init

-Toshio