diff --git a/molecule/bgp/verify.yml b/molecule/bgp/verify.yml deleted file mode 120000 index ed07562c..00000000 --- a/molecule/bgp/verify.yml +++ /dev/null @@ -1 +0,0 @@ -../kubernetes/verify.yml \ No newline at end of file diff --git a/molecule/bgp/verify.yml b/molecule/bgp/verify.yml new file mode 100644 index 00000000..934e7914 --- /dev/null +++ b/molecule/bgp/verify.yml @@ -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 }}" diff --git a/molecule/kubernetes/verify.yml b/molecule/kubernetes/verify.yml index f35e7a82..10ae445f 100644 --- a/molecule/kubernetes/verify.yml +++ b/molecule/kubernetes/verify.yml @@ -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