Hello,
I am running an audit against some interfaces on Cisco switches:
Here is the task:
- ios_command:
provider: “{{ cli }}”
commands: show run interface “{{ item }}” | i no cdp
timeout: 15
register: no_cdp
with_items: “{{ interface_all.stdout_lines }}”
From with_items the value of variables passing as “show run interface "Gi9/1" | i no cdp” which gives me an error as it has " in both leading and trailing side of interface name.
I tried | regex_replace after item to avoid these two characters but no luck.
Could you please help.
Thanks,
Bikram Biswas