Use this command parser and it will simple to compare those :
https://github.com/ansible-network/network-engine/blob/devel/docs/user_guide/command_parser.md
https://github.com/ansible-network/network-engine/blob/devel/docs/directives/parser_directives.md

You should find example on internet.

Le vendredi 8 mars 2019 04:43:20 UTC+11, [email protected] a écrit :
>
> I would like to add some functionality to my Ansible playbooks that does 
> the following; Before making any changes (at beginning of playbook) it runs 
> a number of commands and stores the output of the commands in files. Then 
> when it's finished running, it runs the same commands again and stores to a 
> second set of files. At the end, it then compares those files and if there 
> are any differences, show the differences. The info I would like to gather, 
> are things like; 
>
>
> bgp neighbours  
>
> ipsec vpn peers 
>
> ospf neighbours 
>
> routing table 
>
>
> My logic is that this would be a quick test to make sure nothing has been 
> impacted by the changes in the Ansible playbook.  
>
>
> Does anybody know if this has been done before and if there are example I 
> can copy? If not, any ideas how it can be done? 
>
>
> Thanks

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/554a5e18-b145-44c7-8c38-0afce0d18aed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to