From ed26ee73ffeb927b596487975fb8ddfdb8dba88a Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Mon, 2 Jul 2018 19:57:16 +0530 Subject: [PATCH] Restore BOOLEANS import in basic.py (#42008) This import was removed by mistake. This is required for backward compatibility. Fixes: #41988 Signed-off-by: Abhijeet Kasurde --- changelogs/fragments/basic_booleans_backward_compat.yaml | 3 +++ lib/ansible/module_utils/basic.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/basic_booleans_backward_compat.yaml diff --git a/changelogs/fragments/basic_booleans_backward_compat.yaml b/changelogs/fragments/basic_booleans_backward_compat.yaml new file mode 100644 index 00000000000..1bfb94dad81 --- /dev/null +++ b/changelogs/fragments/basic_booleans_backward_compat.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: +- Restore module_utils.basic.BOOLEANS variable for backwards compatibility with the module API in older ansible releases. diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 0043b676523..8e04f134db2 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -173,7 +173,7 @@ from ansible.module_utils.six import ( ) from ansible.module_utils.six.moves import map, reduce, shlex_quote from ansible.module_utils._text import to_native, to_bytes, to_text -from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE, BOOLEANS_TRUE, boolean +from ansible.module_utils.parsing.convert_bool import BOOLEANS, BOOLEANS_FALSE, BOOLEANS_TRUE, boolean PASSWORD_MATCH = re.compile(r'^(?:.+[-_\s])?pass(?:[-_\s]?(?:word|phrase|wrd|wd)?)(?:[-_\s].+)?$', re.I)