Ansible URI模块未返回值

Ansible URI模块未返回值,ansible,ansible-template,Ansible,Ansible Template,我不确定我做错了什么。这是我的uri任务: - name: Waiting for Entity Submission to complete uri: url: https://{{ endpoint_ip }}:9440/{{ endpoint_api_task }}/{{ intent_status.json.metadata.uuid }} url_username: "{{ endpoint_api_username }}" url_password: "{{

我不确定我做错了什么。这是我的uri任务:

  - name: Waiting for Entity Submission to complete
  uri:
   url: https://{{ endpoint_ip }}:9440/{{ endpoint_api_task }}/{{ intent_status.json.metadata.uuid }}
   url_username: "{{ endpoint_api_username }}"
   url_password: "{{ endpoint_api_password }}"
   validate_certs: false
   force_basic_auth: true
   return_content: true
   follow_redirects: all
   method: 'GET'
  register: v3_progress
  debugger: always
我无法读取返回值
v3\u progress

在调试器中-我看到以下关键错误:

[PE] TASK: nat : Waiting for Entity Submission to complete (debug)> p task_vars['v3_progress']
***KeyError:KeyError('v3_progress',)
如果我调试任务参数-所有参数似乎都足够准确,任务本身得到200:

E] TASK: nat : Waiting for Entity Submission to complete (debug)> p task.args
{'_ansible_check_mode': False,
 '_ansible_debug': False,
 '_ansible_diff': False,
 '_ansible_keep_remote_files': False,
 '_ansible_module_name': u'uri',
 '_ansible_no_log': False,
 '_ansible_remote_tmp': u'~/.ansible/tmp',
 '_ansible_selinux_special_fs': ['fuse',
                                 'nfs',
                                 'vboxsf',
                                 'ramfs',
                                 '9p',
                                 'vfat'],
 '_ansible_shell_executable': u'/bin/sh',
 '_ansible_socket': None,
 '_ansible_string_conversion_action': u'warn',
 '_ansible_syslog_facility': u'LOG_USER',
 '_ansible_tmpdir': u'/home/nutanix/.ansible/tmp/ansible-tmp-1586646620.05-143519614604489/',
 '_ansible_verbosity': 0,
 '_ansible_version': '2.9.6',
 u'follow_redirects': u'all',
 u'force_basic_auth': True,
 u'method': u'GET',
 u'return_content': True,
 u'url': u'https://xxxx/v3/images/ce405ddf-91f1-4399-b5b5-c6f12f1da79c',
 u'url_password': u'xxxx',
 u'url_username': u'admin',
 u'validate_certs': False}

寄存器
变量在
调试器
中不可用。寄存器变量
v3\u progress
的值仅在任务返回时填充,并且仅在后续任务中可用

要在调试器中查看结果,请使用
p result.\u result

您将能够在后续任务中读取
v3\u progress
中的值,如

- name: print uri result
  debug: msg="{{ v3_progress }}"

寄存器
变量在
调试器
中不可用。寄存器变量
v3\u progress
的值仅在任务返回时填充,并且仅在后续任务中可用

要在调试器中查看结果,请使用
p result.\u result

您将能够在后续任务中读取
v3\u progress
中的值,如

- name: print uri result
  debug: msg="{{ v3_progress }}"

谢谢@franklinsijo提供的信息。谢谢@franklinsijo提供的信息。