diff options
author | Simon Dodsley <simon@purestorage.com> | 2019-08-28 00:00:25 +0200 |
---|---|---|
committer | ansibot <ansibot@users.noreply.github.com> | 2019-08-28 00:00:25 +0200 |
commit | 21f0c0f42f336e31ff87bd04f97896f8f7c150a6 (patch) | |
tree | f5d19d35f695ec79eea9ec89a95e8b3ca71b3c37 | |
parent | Changes references to ansible_facts (FA_RA) (#61355) (diff) | |
download | ansible-21f0c0f42f336e31ff87bd04f97896f8f7c150a6.tar.xz ansible-21f0c0f42f336e31ff87bd04f97896f8f7c150a6.zip |
Change references to ansible_facts (#61353)
-rw-r--r-- | changelogs/fragments/61353-purefa_user_change_facts_to_user_info.yaml | 2 | ||||
-rw-r--r-- | lib/ansible/modules/storage/purestorage/purefa_user.py | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/changelogs/fragments/61353-purefa_user_change_facts_to_user_info.yaml b/changelogs/fragments/61353-purefa_user_change_facts_to_user_info.yaml new file mode 100644 index 0000000000..b2a4c09fd8 --- /dev/null +++ b/changelogs/fragments/61353-purefa_user_change_facts_to_user_info.yaml @@ -0,0 +1,2 @@ +minor_changes: + - purefa_user - change resulting fact dict from I(ansible_facts) to I(user_info) (https://github.com/ansible/ansible/pull/61353) diff --git a/lib/ansible/modules/storage/purestorage/purefa_user.py b/lib/ansible/modules/storage/purestorage/purefa_user.py index 6f8ff0dc83..c948eecc82 100644 --- a/lib/ansible/modules/storage/purestorage/purefa_user.py +++ b/lib/ansible/modules/storage/purestorage/purefa_user.py @@ -63,9 +63,10 @@ EXAMPLES = r''' api: true fa_url: 10.10.10.2 api_token: e31060a7-21fc-e277-6240-25983c6c4592 + register: result debug: - msg: "API Token: {{ ansible_facts['api_token'] }}" + msg: "API Token: {{ result['user_info']['user_api'] }}" - name: Change role type for existing user purefa_user: @@ -90,9 +91,10 @@ EXAMPLES = r''' state: update fa_url: 10.10.10.2 api_token: e31060a7-21fc-e277-6240-25983c6c4592 + register: result debug: - msg: "API Token: {{ ansible_facts['user_api'] }}" + msg: "API Token: {{ result['user_info']['user_api'] }}" ''' RETURN = r''' @@ -171,7 +173,7 @@ def create_user(module, array): module.fail_json(msg='Local User {0}: Role changed failed'.format(module.params['name'])) if passwd_changed or role_changed or api_changed: changed = True - module.exit_json(changed=changed, ansible_facts=user_token) + module.exit_json(changed=changed, user_info=user_token) def delete_user(module, array): |