diff --git a/ansible.cfg b/ansible.cfg index d2d1dbf..1fb531a 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,5 +1,5 @@ [defaults] -roles_path = /srv/ansible/roles +roles_path = /srv/nslab-ansible/roles host_key_checking = False library = /srv/nslab-ansible/local/lib/python2.7/site-packages/napalm_ansible/modules action_plugins = /srv/nslab-ansible/local/lib/python2.7/site-packages/napalm_ansible/plugins/action diff --git a/validate.yml b/validate.yml index eda474c..6e744be 100644 --- a/validate.yml +++ b/validate.yml @@ -21,15 +21,13 @@ - name: Validate core interfaces are up assert: that: napalm_interfaces[item.split('.')[0]].is_up == true - msg: | - Interface {{item}} on {{inventory_hostname}} is not operational + msg: Interface {{item}} on {{inventory_hostname}} is not operational with_list: "{{node.links.keys()}}" ignore_errors: true - name: Validate LLDP neighbors assert: that: node.links[item.key].remote == napalm_lldp_neighbors[item.key.split('.')[0]][0].hostname - msg: | - Router {{inventory_hostname}} has incorrect neighbor on {{item.key}} interface + msg: Router {{inventory_hostname}} has incorrect neighbor on {{item.key}} interface with_dict: "{{node.links}}" ignore_errors: True - name: Validate correct IP and subnet mask @@ -37,16 +35,14 @@ that: - napalm_interfaces_ip[item].ipv4.keys()[0] == node.links[item].ip - napalm_interfaces_ip[item].ipv4.values()[0]['prefix_length'] == 24 - msg: | - Interface {{item}} on {{inventory_hostname}} has incorrect IP address + msg: Interface {{item}} on {{inventory_hostname}} has incorrect IP address with_list: "{{node.links.keys()}}" ignore_errors: True - name: Validate BGP Sessions assert: that: - napalm_bgp_neighbors.global.peers[item].is_up == true - msg: | - BGP neighbor {{item}} on {{inventory_hostname}} is not operational + msg: BGP neighbor {{item}} on {{inventory_hostname}} is not operational with_list: "{{node.bgp.ibgp.peers}}" ignore_errors: true