You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: show ip ospf neighboransible.utils.cli_parse:
command: show ip ospf neighborparser:
name: ansible.netcommon.ntc_templatesregister: result_show_ip_ospf_neighboruntil:
- (result_show_ip_ospf_neighbor.parsed | length) >= 2
- result_show_ip_ospf_neighbor.parsed[1].state == 'FULL/DR'
EXPECTED RESULTS
Run show ip ospf neighbor command until the second ospf neighbor is FULL state.
ACTUAL RESULTS
When retrying with until directive, the value of the register variable is not as intended. And an error 'dict object' has no attribute 'parsed' occurs.
TASK [show ip ospf neighbor] **********************************************************************************************************************************
task path: /Users/akira/Documents/ansible/ios_test.yml:10
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
redirecting (type: terminal) ansible.builtin.ios to cisco.ios.ios
redirecting (type: cliconf) ansible.builtin.ios to cisco.ios.ios
FAILED - RETRYING: [ios01]: show ip ospf neighbor (3 retries left).Result was: {
"attempts": 1,
"changed": false,
"parsed": [
{
"address": "10.1.1.1",
"dead_time": "00:00:32",
"interface": "GigabitEthernet0/3",
"neighbor_id": "192.168.1.105",
"priority": "1",
"state": "FULL/DR"
}
],
"retries": 4,
"stdout": "Neighbor ID Pri State Dead Time Address Interface\n192.168.1.105 1 FULL/DR 00:00:32 10.1.1.1 GigabitEthernet0/3",
"stdout_lines": [
"Neighbor ID Pri State Dead Time Address Interface",
"192.168.1.105 1 FULL/DR 00:00:32 10.1.1.1 GigabitEthernet0/3"
]
}
fatal: [ios01]: FAILED! => {
"msg": "The conditional check '(result_show_ip_ospf_neighbor.parsed | length) >= 2' failed. The error was: error while evaluating conditional ((result_show_ip_ospf_neighbor.parsed | length) >= 2): 'dict object' has no attribute 'parsed'"
}
When displaying the value of the register variable at the time of retry, it contained an error of parameters are mutually exclusive: command|text. But I used only command.
- name: show ip ospf neighboransible.utils.cli_parse:
command: show ip ospf neighborparser:
name: ansible.netcommon.ntc_templatesregister: result_show_ip_ospf_neighboruntil:
- false # for debug
The result is bellow:
...omitted...
FAILED - RETRYING: [ios01]: show ip ospf neighbor (2 retries left).Result was: {
"attempts": 2,
"changed": false,
"errors": [
"parameters are mutually exclusive: command|text"
],
"msg": "argspec validation failed for cli_parse module plugin",
"retries": 4
}
...omitted...
The text was updated successfully, but these errors were encountered:
SUMMARY
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Cisco IOS 15.9(3)M3
STEPS TO REPRODUCE
The task is bellow:
EXPECTED RESULTS
Run
show ip ospf neighbor
command until the second ospf neighbor isFULL
state.ACTUAL RESULTS
When retrying with until directive, the value of the register variable is not as intended. And an error
'dict object' has no attribute 'parsed'
occurs.When displaying the value of the register variable at the time of retry, it contained an error of
parameters are mutually exclusive: command|text
. But I used onlycommand
.The result is bellow:
The text was updated successfully, but these errors were encountered: