From 346063795d5798f6722d5ca53103818db22c55b7 Mon Sep 17 00:00:00 2001 From: Jeff Li Date: Sat, 27 Jan 2018 05:08:13 +0800 Subject: [PATCH] Add identity_api_version opt in OpenStack modules (#26103) Fix #26092 : OpenStack modules does not work with identity v3 --- lib/ansible/module_utils/openstack.py | 3 +++ lib/ansible/utils/module_docs_fragments/openstack.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/lib/ansible/module_utils/openstack.py b/lib/ansible/module_utils/openstack.py index afbd8857eb..9cfc6cba0c 100644 --- a/lib/ansible/module_utils/openstack.py +++ b/lib/ansible/module_utils/openstack.py @@ -90,6 +90,9 @@ def openstack_full_argument_spec(**kwargs): api_timeout=dict(default=None, type='int'), endpoint_type=dict( default='public', choices=['public', 'internal', 'admin'] + ), + identity_api_version=dict( + default=None, choices=['2.0', '3'] ) ) spec.update(kwargs) diff --git a/lib/ansible/utils/module_docs_fragments/openstack.py b/lib/ansible/utils/module_docs_fragments/openstack.py index 88aaad1799..ade8aa7135 100644 --- a/lib/ansible/utils/module_docs_fragments/openstack.py +++ b/lib/ansible/utils/module_docs_fragments/openstack.py @@ -93,6 +93,12 @@ options: choices: [public, internal, admin] required: false default: public + identity_api_version: + description: + - The identity API version + choices: [2.0, 3] + required: false + default: None requirements: - python >= 2.7 - shade