mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-04 02:58:17 -03:30
Add noqa and disable .ansible-lint global exclusions (#6410)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
- import_role:
|
||||
name: cluster-dump
|
||||
|
||||
- name: Check kubectl output
|
||||
- name: Check kubectl output # noqa 301 305
|
||||
shell: "{{ bin_dir }}/kubectl get nodes"
|
||||
register: get_nodes
|
||||
no_log: true
|
||||
@@ -23,7 +23,7 @@
|
||||
- debug:
|
||||
msg: "{{ get_nodes.stdout.split('\n') }}"
|
||||
|
||||
- name: Check that all nodes are running and ready
|
||||
- name: Check that all nodes are running and ready # noqa 301 305
|
||||
shell: "{{ bin_dir }}/kubectl get nodes --no-headers -o yaml"
|
||||
register: get_nodes_yaml
|
||||
until:
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
- import_role:
|
||||
name: cluster-dump
|
||||
|
||||
- name: Check kubectl output
|
||||
- name: Check kubectl output # noqa 301 305
|
||||
shell: "{{ bin_dir }}/kubectl get pods --all-namespaces -owide"
|
||||
register: get_pods
|
||||
no_log: true
|
||||
@@ -23,7 +23,7 @@
|
||||
- debug:
|
||||
msg: "{{ get_pods.stdout.split('\n') }}"
|
||||
|
||||
- name: Check that all pods are running and ready
|
||||
- name: Check that all pods are running and ready # noqa 301 305
|
||||
shell: "{{ bin_dir }}/kubectl get pods --all-namespaces --no-headers -o yaml"
|
||||
register: run_pods_log
|
||||
until:
|
||||
@@ -36,7 +36,7 @@
|
||||
failed_when: false
|
||||
no_log: true
|
||||
|
||||
- name: Check kubectl output
|
||||
- name: Check kubectl output # noqa 301 305
|
||||
shell: "{{ bin_dir }}/kubectl get pods --all-namespaces -owide"
|
||||
register: get_pods
|
||||
no_log: true
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
bin_dir: "/usr/local/bin"
|
||||
when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
|
||||
- name: Create test namespace
|
||||
- name: Create test namespace # noqa 301 305
|
||||
shell: "{{ bin_dir }}/kubectl create namespace test"
|
||||
|
||||
- name: Run 2 busybox pods in test ns
|
||||
- name: Run 2 busybox pods in test ns # noqa 301 305
|
||||
shell: "{{ bin_dir }}/kubectl run {{ item }} --image={{ test_image_repo }}:{{ test_image_tag }} --namespace test --command -- tail -f /dev/null"
|
||||
loop:
|
||||
- busybox1
|
||||
@@ -27,7 +27,7 @@
|
||||
- import_role:
|
||||
name: cluster-dump
|
||||
|
||||
- name: Check that all pods are running and ready
|
||||
- name: Check that all pods are running and ready # noqa 301 305
|
||||
shell: "{{ bin_dir }}/kubectl get pods --namespace test --no-headers -o yaml"
|
||||
register: run_pods_log
|
||||
until:
|
||||
@@ -40,7 +40,7 @@
|
||||
failed_when: false
|
||||
no_log: true
|
||||
|
||||
- name: Get pod names
|
||||
- name: Get pod names # noqa 301 305
|
||||
shell: "{{ bin_dir }}/kubectl get pods -n test -o json"
|
||||
register: pods
|
||||
no_log: true
|
||||
@@ -49,19 +49,19 @@
|
||||
msg: "{{ pods.stdout.split('\n') }}"
|
||||
failed_when: not run_pods_log is success
|
||||
|
||||
- name: Get hostnet pods
|
||||
- name: Get hostnet pods # noqa 301
|
||||
command: "{{ bin_dir }}/kubectl get pods -n test -o
|
||||
jsonpath='{range .items[?(.spec.hostNetwork)]}{.metadata.name} {.status.podIP} {.status.containerStatuses} {end}'"
|
||||
register: hostnet_pods
|
||||
no_log: true
|
||||
|
||||
- name: Get running pods
|
||||
- name: Get running pods # noqa 301
|
||||
command: "{{ bin_dir }}/kubectl get pods -n test -o
|
||||
jsonpath='{range .items[?(.status.phase==\"Running\")]}{.metadata.name} {.status.podIP} {.status.containerStatuses} {end}'"
|
||||
register: running_pods
|
||||
no_log: true
|
||||
|
||||
- name: Check kubectl output
|
||||
- name: Check kubectl output # noqa 301 305
|
||||
shell: "{{ bin_dir }}/kubectl get pods --all-namespaces -owide"
|
||||
register: get_pods
|
||||
no_log: true
|
||||
@@ -89,7 +89,7 @@
|
||||
- item in pods_running
|
||||
with_items: "{{ pod_ips }}"
|
||||
|
||||
- name: Ping between pods is working
|
||||
- name: Ping between pods is working # noqa 305
|
||||
shell: "{{ bin_dir }}/kubectl -n test exec {{ item[0] }} -- ping -c 4 {{ item[1] }}"
|
||||
when:
|
||||
- not item[0] in pods_hostnet
|
||||
@@ -98,7 +98,7 @@
|
||||
- "{{ pod_names }}"
|
||||
- "{{ pod_ips }}"
|
||||
|
||||
- name: Ping between hostnet pods is working
|
||||
- name: Ping between hostnet pods is working # noqa 305
|
||||
shell: "{{ bin_dir }}/kubectl -n test exec {{ item[0] }} -- ping -c 4 {{ item[1] }}"
|
||||
when:
|
||||
- item[0] in pods_hostnet
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- hosts: kube-node
|
||||
tasks:
|
||||
- name: Test tunl0 routes
|
||||
- name: Test tunl0 routes # noqa 306
|
||||
shell: "! /sbin/ip ro | grep '/26 via' | grep -v tunl0"
|
||||
when:
|
||||
- (ipip|default(true) or cloud_provider is defined)
|
||||
@@ -14,7 +14,7 @@
|
||||
netchecker_port: 31081
|
||||
|
||||
tasks:
|
||||
- name: Flannel | Disable tx and rx offloading on VXLAN interfaces (see https://github.com/coreos/flannel/pull/1282)
|
||||
- name: Flannel | Disable tx and rx offloading on VXLAN interfaces (see https://github.com/coreos/flannel/pull/1282) # noqa 305
|
||||
shell: "ethtool --offload flannel.1 rx off tx off"
|
||||
ignore_errors: true
|
||||
when:
|
||||
@@ -33,7 +33,7 @@
|
||||
- import_role:
|
||||
name: cluster-dump
|
||||
|
||||
- name: Wait for netchecker server
|
||||
- name: Wait for netchecker server # noqa 306
|
||||
shell: "{{ bin_dir }}/kubectl get pods -o wide --namespace {{ netcheck_namespace }} | grep ^netchecker-server"
|
||||
register: ncs_pod
|
||||
until: ncs_pod.stdout.find('Running') != -1
|
||||
@@ -41,7 +41,7 @@
|
||||
delay: 10
|
||||
when: inventory_hostname == groups['kube-master'][0]
|
||||
|
||||
- name: Wait for netchecker agents
|
||||
- name: Wait for netchecker agents # noqa 306
|
||||
shell: "{{ bin_dir }}/kubectl get pods -o wide --namespace {{ netcheck_namespace }} | grep '^netchecker-agent-.*Running'"
|
||||
register: nca_pod
|
||||
until: nca_pod.stdout_lines|length >= groups['k8s-cluster']|intersect(ansible_play_hosts)|length * 2
|
||||
@@ -214,7 +214,7 @@
|
||||
- inventory_hostname == groups['kube-master'][0]
|
||||
- kube_network_plugin_multus|default(false)|bool
|
||||
|
||||
- name: Check secondary macvlan interface
|
||||
- name: Check secondary macvlan interface # noqa 305
|
||||
shell: "{{ bin_dir }}/kubectl exec samplepod -- ip addr show dev net1"
|
||||
register: output
|
||||
until: output.rc == 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: Generate dump folder
|
||||
- name: Generate dump folder # noqa 305
|
||||
shell: "{{ bin_dir }}/kubectl cluster-info dump --all-namespaces --output-directory /tmp/cluster-dump"
|
||||
no_log: true
|
||||
when: inventory_hostname in groups['kube-master']
|
||||
|
||||
Reference in New Issue
Block a user