mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-03 10:38:19 -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
@@ -3,7 +3,7 @@ multus_conf_file: "auto"
|
||||
multus_cni_conf_dir_host: "/etc/cni/net.d"
|
||||
multus_cni_bin_dir_host: "/opt/cni/bin"
|
||||
multus_cni_run_dir_host: "/run"
|
||||
multus_cni_conf_dir: "{{ ('/host', multus_cni_conf_dir_host) | join }}"
|
||||
multus_cni_conf_dir: "{{ ('/host', multus_cni_conf_dir_host) | join }}"
|
||||
multus_cni_bin_dir: "{{ ('/host', multus_cni_bin_dir_host) | join }}"
|
||||
multus_cni_run_dir: "{{ ('/host', multus_cni_run_dir_host) | join }}"
|
||||
multus_cni_version: "0.4.0"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
- name: Multus | Check container engine type
|
||||
set_fact:
|
||||
container_manager_types: "{{ ansible_play_hosts_all|map('extract', hostvars, ['container_manager'])|list|unique }}"
|
||||
container_manager_types: "{{ ansible_play_hosts_all | map('extract', hostvars, ['container_manager']) | list | unique }}"
|
||||
|
||||
- name: Multus | Copy manifest templates
|
||||
template:
|
||||
@@ -28,7 +28,7 @@
|
||||
register: multus_manifest_2
|
||||
vars:
|
||||
query: "*|[?container_manager=='{{ container_manager }}']|[0].inventory_hostname"
|
||||
vars_from_node: "{{ hostvars|json_query(query) }}"
|
||||
vars_from_node: "{{ hostvars | json_query(query) }}"
|
||||
delegate_to: "{{ groups['kube_control_plane'][0] }}"
|
||||
when:
|
||||
- item.engine in container_manager_types
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
kind: DaemonSet
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
{% if container_manager_types|length >= 2 %}
|
||||
{% if container_manager_types | length >= 2 %}
|
||||
name: kube-multus-{{ container_manager }}-{{ image_arch }}
|
||||
{% else %}
|
||||
name: kube-multus-ds-{{ image_arch }}
|
||||
@@ -26,7 +26,7 @@ spec:
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: {{ image_arch }}
|
||||
{% if container_manager_types|length >= 2 %}
|
||||
{% if container_manager_types | length >= 2 %}
|
||||
kubespray.io/container_manager: {{ container_manager }}
|
||||
{% endif %}
|
||||
tolerations:
|
||||
@@ -62,7 +62,7 @@ spec:
|
||||
mountPropagation: HostToContainer
|
||||
{% endif %}
|
||||
- name: cni
|
||||
mountPath: {{ multus_cni_conf_dir }}
|
||||
mountPath: {{ multus_cni_conf_dir }}
|
||||
- name: cnibin
|
||||
mountPath: {{ multus_cni_bin_dir }}
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user