Fix E306 in tests/ (#6495)
parent
fc23f37af7
commit
50598d9d47
|
@ -29,8 +29,10 @@
|
|||
loop_control:
|
||||
index_var: vm_id
|
||||
|
||||
- name: Wait for vms to have ipaddress assigned # noqa 306
|
||||
shell: "kubectl get vmis -n {{ test_name }} instance-{{ vm_id }} -o json | jq '.status.interfaces[].ipAddress' | tr -d '\"'"
|
||||
- name: Wait for vms to have ipaddress assigned
|
||||
shell: "set -o pipefail && kubectl get vmis -n {{ test_name }} instance-{{ vm_id }} -o json | jq '.status.interfaces[].ipAddress' | tr -d '\"'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
changed_when: false
|
||||
register: vm_ips
|
||||
loop: "{{ range(1, vm_count|int + 1, 1) | list }}"
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
---
|
||||
- hosts: kube-node
|
||||
tasks:
|
||||
- name: Test tunl0 routes # noqa 306
|
||||
shell: "! /sbin/ip ro | grep '/26 via' | grep -v tunl0"
|
||||
- name: Test tunl0 routes
|
||||
shell: "set -o pipefail && ! /sbin/ip ro | grep '/26 via' | grep -v tunl0"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
when:
|
||||
- (ipip|default(true) or cloud_provider is defined)
|
||||
- kube_network_plugin|default('calico') == 'calico'
|
||||
|
@ -33,16 +35,20 @@
|
|||
- import_role:
|
||||
name: cluster-dump
|
||||
|
||||
- name: Wait for netchecker server # noqa 306
|
||||
shell: "{{ bin_dir }}/kubectl get pods -o wide --namespace {{ netcheck_namespace }} | grep ^netchecker-server"
|
||||
- name: Wait for netchecker server
|
||||
shell: "set -o pipefail && {{ bin_dir }}/kubectl get pods -o wide --namespace {{ netcheck_namespace }} | grep ^netchecker-server"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: ncs_pod
|
||||
until: ncs_pod.stdout.find('Running') != -1
|
||||
retries: 3
|
||||
delay: 10
|
||||
when: inventory_hostname == groups['kube-master'][0]
|
||||
|
||||
- name: Wait for netchecker agents # noqa 306
|
||||
shell: "{{ bin_dir }}/kubectl get pods -o wide --namespace {{ netcheck_namespace }} | grep '^netchecker-agent-.*Running'"
|
||||
- name: Wait for netchecker agents
|
||||
shell: "set -o pipefail && {{ bin_dir }}/kubectl get pods -o wide --namespace {{ netcheck_namespace }} | grep '^netchecker-agent-.*Running'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: nca_pod
|
||||
until: nca_pod.stdout_lines|length >= groups['k8s-cluster']|intersect(ansible_play_hosts)|length * 2
|
||||
retries: 3
|
||||
|
|
Loading…
Reference in New Issue