Skip to content

Commit

Permalink
add molecule bgp verify
Browse files Browse the repository at this point in the history
  • Loading branch information
ricolin committed Dec 10, 2024
1 parent 3fb1837 commit a1feade
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
1 change: 0 additions & 1 deletion molecule/bgp/verify.yml

This file was deleted.

33 changes: 33 additions & 0 deletions molecule/bgp/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) 2024 VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

- ansible.builtin.import_playbook: ../kubernetes/verify.yml

- name: verify BGP
hosts: all
become: true
tasks:
- name: Get all nodes
ansible.builtin.command: |
vtysh -c 'show ip bgp neighbors 172.17.0.100 received-routes'
register: received
retries: 60
delay: 2
until:
- received.rc == 0
- received.stdout.find('172.17.0.100/32') != -1

- name: Print bgp neighbors received-routes
ansible.builtin.debug:
msg: "{{ received.stdout_lines }}"
2 changes: 1 addition & 1 deletion molecule/kubernetes/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
ansible.builtin.debug:
msg: "{{ nodes.stdout_lines }}"

- name: Assert no nody is not ready
- name: Assert no node is not ready
ansible.builtin.assert:
that:
- nodes.stdout.find('NotReady') == -1

0 comments on commit a1feade

Please sign in to comment.