[go: up one dir, main page]

Skip to content

Commit

Permalink
restart bgp if instance not found
Browse files Browse the repository at this point in the history
  • Loading branch information
iljarotar committed Sep 27, 2024
1 parent 66d0db0 commit 569cf33
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions partition/roles/metal-core/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,12 @@
port: 2112
timeout: 300
msg: "metal-core did not come up"

- name: check if bgp session is up
ansible.builtin.command: vtysh -c 'show bgp summary'
register: bgp_summary
changed_when: false

- name: restart bgp if necessary
notify: restart bgp
when: "'BGP instance not found' in {{ bgp_summary.stdout }}"

0 comments on commit 569cf33

Please sign in to comment.