Ansible 任务 "network-ovn : include_tasks" 执行失败,错误信息为:

'We were unable to read either as JSON nor YAML, these are the errors we got from each: JSON: No JSON object could be decoded

Syntax Error while loading YAML. found unacceptable key (unhashable type: 'AnsibleMapping')

The error appears to be in '/root/init/sdnagent/roles/network-ovn/tasks/upgrade_network_ovn_amd64.yaml': line 7, column 10, but may be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- host_architecture == "amd64"

loop: {{ ovn_upgrade_lists }} ^ here We could be wrong, but this one looks like it might be an issue with missing quotes. Always quote template expression brackets when they start a value. For instance:

with_items:
  - {{ foo }}

Should be written as:

with_items:
  - "{{ foo }}"

'

Ansible 任务执行失败:YAML 文件语法错误

原文地址: https://www.cveoy.top/t/topic/lVGR 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录