--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fd4b0f7a-85ba-4921-b252-9b760d1bd3d8o%40googlegroups.com.
I would use the genie module and run the show cdp neighbor command. Then set fact and use that with the when command.
On Fri, Jun 19, 2020, 10:05 PM Jason <jasonno...@gmail.com> wrote:
I am working on a project that would require me to bump (shutdown and re-enable) switchports that are connected to an Access Point.--I have created a playbook to run a command "show cdp neighbours" on the switch, and that output would look like:What I want to do, is to use ansible to only run a command (ansible play) on Gig 1/0/19 in this case. For other switches, it may be more switchports and maybe in different format (eg. Gi 2/0/35).Is there a way to filter ansible output by looking for 'AIR-AP280' and then extract that corresponding Local Interface (switchport number)?Or if there is another way to get done what I want, then great.Any suggestions/recommendations?It is over 50 switches, so it would be great if ansible can do what I want to do.
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/644c6f2a-5a02-49fd-b84a-1c74ad722daao%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/644c6f2a-5a02-49fd-b84a-1c74ad722daao%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9a09ee0c-1184-4d74-a41f-b69a89fca04co%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9a09ee0c-1184-4d74-a41f-b69a89fca04co%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/36cda932-fe68-499b-a70b-acf81cd693cfo%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/36cda932-fe68-499b-a70b-acf81cd693cfo%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cda449ee-3155-40ab-9feb-474d1355bf8eo%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cda449ee-3155-40ab-9feb-474d1355bf8eo%40googlegroups.com.