Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ansible/roles/test/tasks/link_flap/link_flap_helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
assert: { that: "'{{ ansible_interface_facts[item]['active'] }}' == 'True'" }
with_items: "{{ minigraph_ports }}"
when: item != "{{ intfs_to_exclude }}"
connection: local
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think to add connection: local is needed here.
Ansible will determine whether a command needs to be executed locally or not. It would be better to remove the conditions here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I merged already.

But making it explicit should be good too?

If you insist, I can remove it when I am making the interface_facts.py change.

Cheers,
Ying

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove


- name: Verify {{intfs_to_exclude}} is down correctly
assert: { that: "'{{ ansible_interface_facts[item]['active'] }}' == 'False'" }
with_items: "{{ minigraph_ports }}"
when: item == "{{ intfs_to_exclude }}"
assert: { that: "'{{ ansible_interface_facts[intfs_to_exclude]['active'] }}' == 'False'" }
connection: local

always:
- name: Bring up neighbor interface {{neighbor_interface}} on {{peer_host}}
Expand All @@ -60,3 +60,4 @@
- name: Verify all interfaces are up
assert: { that: "'{{ ansible_interface_facts[item]['active'] }}' == 'True'" }
with_items: "{{ minigraph_ports }}"
connection: local