“msg”:“无法在Ansible中应用条件生成结果”

2024-05-16 08:07:44 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试运行下面的任务,它可以避免下面的错误,有没有办法修复它

fatal: [SW1]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "unable to apply conditional to result"}

这是剧本,NXOS是一组主机

- name: SNMP ACLs Configuration 
  hosts: NXOS
  gather_facts: false
  connection: local

  tasks:
    - name: SNMP ACLs for NXOS
      nxos_command:
        commands:
          - copy http://1.2.3.4/tftpboot-directory/snmp_acl.txt running-config vrf default
        wait_for:
         - result[1] contains Copy complete.

Tags: tonamefalsefor错误resultansiblesnmp