mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-14 01:34:51 -03:30
project: fix var-spacing ansible rule (#10266)
* project: fix var-spacing ansible rule Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix spacing on the beginning/end of jinja template Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix spacing of default filter Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix spacing between filter arguments Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix double space at beginning/end of jinja Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix remaining jinja[spacing] ansible-lint warning Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> --------- Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
This commit is contained in:
committed by
GitHub
parent
f8b93fa88a
commit
5d00b851ce
@@ -168,8 +168,8 @@
|
||||
- name: Set networking facts
|
||||
set_fact:
|
||||
kube_pods_subnet: 10.233.64.0/18
|
||||
pod_names: "{{ (pods.stdout | from_json)['items'] | map(attribute = 'metadata.name') | list }}"
|
||||
pod_ips: "{{ (pods.stdout | from_json)['items'] | selectattr('status.podIP', 'defined') | map(attribute = 'status.podIP') | list }}"
|
||||
pod_names: "{{ (pods.stdout | from_json)['items'] | map(attribute='metadata.name') | list }}"
|
||||
pod_ips: "{{ (pods.stdout | from_json)['items'] | selectattr('status.podIP', 'defined') | map(attribute='status.podIP') | list }}"
|
||||
pods_hostnet: |
|
||||
{% set list = hostnet_pods.stdout.split(" ") %}
|
||||
{{ list }}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
executable: /bin/bash
|
||||
when:
|
||||
- (calico_ipip_mode is defined and calico_ipip_mode != 'Never' or cloud_provider is defined)
|
||||
- kube_network_plugin|default('calico') == 'calico'
|
||||
- kube_network_plugin | default('calico') == 'calico'
|
||||
|
||||
- hosts: k8s_cluster
|
||||
vars:
|
||||
@@ -44,7 +44,7 @@
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: nca_pod
|
||||
until: nca_pod.stdout_lines|length >= groups['k8s_cluster']|intersect(ansible_play_hosts)|length * 2
|
||||
until: nca_pod.stdout_lines | length >= groups['k8s_cluster'] | intersect(ansible_play_hosts) | length * 2
|
||||
retries: 3
|
||||
delay: 10
|
||||
failed_when: false
|
||||
@@ -73,9 +73,9 @@
|
||||
register: agents
|
||||
retries: 18
|
||||
delay: "{{ agent_report_interval }}"
|
||||
until: agents.content|length > 0 and
|
||||
until: agents.content | length > 0 and
|
||||
agents.content[0] == '{' and
|
||||
agents.content|from_json|length >= groups['k8s_cluster']|intersect(ansible_play_hosts)|length * 2
|
||||
agents.content | from_json | length >= groups['k8s_cluster'] | intersect(ansible_play_hosts) | length * 2
|
||||
failed_when: false
|
||||
no_log: false
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
register: connectivity_check
|
||||
retries: 3
|
||||
delay: "{{ agent_report_interval }}"
|
||||
until: connectivity_check.content|length > 0 and
|
||||
until: connectivity_check.content | length > 0 and
|
||||
connectivity_check.content[0] == '{'
|
||||
no_log: false
|
||||
failed_when: false
|
||||
@@ -200,7 +200,7 @@
|
||||
executable: /bin/bash
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
- kube_network_plugin_multus|default(false)|bool
|
||||
- kube_network_plugin_multus | default(false) | bool
|
||||
|
||||
- name: Annotate pod with macvlan network
|
||||
# We cannot use only shell: below because Ansible will render the text
|
||||
@@ -226,7 +226,7 @@
|
||||
executable: /bin/bash
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
- kube_network_plugin_multus|default(false)|bool
|
||||
- kube_network_plugin_multus | default(false) | bool
|
||||
|
||||
- name: Check secondary macvlan interface
|
||||
command: "{{ bin_dir }}/kubectl exec samplepod -- ip addr show dev net1"
|
||||
@@ -236,4 +236,4 @@
|
||||
changed_when: false
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
- kube_network_plugin_multus|default(false)|bool
|
||||
- kube_network_plugin_multus | default(false) | bool
|
||||
|
||||
Reference in New Issue
Block a user