Add noqa and disable .ansible-lint global exclusions (#6410)

This commit is contained in:
Maxime Guyot
2020-07-27 15:24:17 +02:00
committed by GitHub
parent b680cdd0e4
commit e70f27dd79
74 changed files with 163 additions and 170 deletions

View File

@@ -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