Only return machines that are in "Deployed" status to Ansible. - Thanks @v92
Reworked some of the code, added extra features and made compatibility changes so it works for MAAS API 2.0.
Dropped support for MAAS API 1.0 as MAAS itself no longer supports it.
Original version written around August 28th, 2015 for MAAS API version 1.0 by Paul Stevens mailto:[email protected]