diff --git a/ansible/roles/test/tasks/interface.yml b/ansible/roles/test/tasks/interface.yml new file mode 100644 index 00000000000..c6b56e6a05d --- /dev/null +++ b/ansible/roles/test/tasks/interface.yml @@ -0,0 +1,7 @@ +- name: Get interface facts + interface_facts: + +- name: Verify interfaces are up correctly + assert: { that: "'{{ ansible_interface_facts[item]['active'] }}' == 'True'" } + with_items: minigraph_interfaces | map(attribute='alias') | list + diff --git a/ansible/roles/test/tasks/sonic.yml b/ansible/roles/test/tasks/sonic.yml index c516257dd41..5dc71725ab7 100644 --- a/ansible/roles/test/tasks/sonic.yml +++ b/ansible/roles/test/tasks/sonic.yml @@ -1,3 +1,13 @@ +- name: Gathering minigraph facts about the device + minigraph_facts: host={{ inventory_hostname }} + connection: local + become: no + tags: always + +- name: Verify interfaces are up + include: interface.yml + tags: always + - name: Neighbor mac change test include: neighbour-mac.yml tags: neighbour