From 9fea94b5bf8c326775d0e8d4fafab686c616461a Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Thu, 3 Mar 2016 00:50:11 +0100 Subject: [PATCH] Fix instantiation of openstack_cloud object in os_project The os_project module instantiates the openstack cloud object by passing the module params kwargs. As the params contain a key named 'domain_id', this is used for domain in the OpenStack connection, instead of the domain value the user specifies on the OSCC clouds.yaml or OpenStack envvars. This fix corrects this by popping the 'domain_id' key, so it we keep the value but it's not passed later on module.params. --- lib/ansible/modules/extras/cloud/openstack/os_project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/cloud/openstack/os_project.py b/lib/ansible/modules/extras/cloud/openstack/os_project.py index b159264ebd..b900d42f16 100644 --- a/lib/ansible/modules/extras/cloud/openstack/os_project.py +++ b/lib/ansible/modules/extras/cloud/openstack/os_project.py @@ -156,7 +156,7 @@ def main(): name = module.params['name'] description = module.params['description'] - domain = module.params['domain_id'] + domain = module.params.pop('domain_id') enabled = module.params['enabled'] state = module.params['state']