mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-21 13:10:19 -03:30
Resolve ansible-lint name errors (#10253)
* project: fix ansible-lint name Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: ignore jinja template error in names Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: capitalize ansible name Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: update notify after name capitalization 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
b9e3861385
commit
36e5d742dc
@@ -1,82 +1,82 @@
|
||||
---
|
||||
- name: check azure_tenant_id value
|
||||
- name: Check azure_tenant_id value
|
||||
fail:
|
||||
msg: "azure_tenant_id is missing"
|
||||
when: azure_tenant_id is not defined or not azure_tenant_id
|
||||
|
||||
- name: check azure_subscription_id value
|
||||
- name: Check azure_subscription_id value
|
||||
fail:
|
||||
msg: "azure_subscription_id is missing"
|
||||
when: azure_subscription_id is not defined or not azure_subscription_id
|
||||
|
||||
- name: check azure_aad_client_id value
|
||||
- name: Check azure_aad_client_id value
|
||||
fail:
|
||||
msg: "azure_aad_client_id is missing"
|
||||
when: azure_aad_client_id is not defined or not azure_aad_client_id
|
||||
|
||||
- name: check azure_aad_client_secret value
|
||||
- name: Check azure_aad_client_secret value
|
||||
fail:
|
||||
msg: "azure_aad_client_secret is missing"
|
||||
when: azure_aad_client_secret is not defined or not azure_aad_client_secret
|
||||
|
||||
- name: check azure_resource_group value
|
||||
- name: Check azure_resource_group value
|
||||
fail:
|
||||
msg: "azure_resource_group is missing"
|
||||
when: azure_resource_group is not defined or not azure_resource_group
|
||||
|
||||
- name: check azure_location value
|
||||
- name: Check azure_location value
|
||||
fail:
|
||||
msg: "azure_location is missing"
|
||||
when: azure_location is not defined or not azure_location
|
||||
|
||||
- name: check azure_subnet_name value
|
||||
- name: Check azure_subnet_name value
|
||||
fail:
|
||||
msg: "azure_subnet_name is missing"
|
||||
when: azure_subnet_name is not defined or not azure_subnet_name
|
||||
|
||||
- name: check azure_security_group_name value
|
||||
- name: Check azure_security_group_name value
|
||||
fail:
|
||||
msg: "azure_security_group_name is missing"
|
||||
when: azure_security_group_name is not defined or not azure_security_group_name
|
||||
|
||||
- name: check azure_vnet_name value
|
||||
- name: Check azure_vnet_name value
|
||||
fail:
|
||||
msg: "azure_vnet_name is missing"
|
||||
when: azure_vnet_name is not defined or not azure_vnet_name
|
||||
|
||||
- name: check azure_vnet_resource_group value
|
||||
- name: Check azure_vnet_resource_group value
|
||||
fail:
|
||||
msg: "azure_vnet_resource_group is missing"
|
||||
when: azure_vnet_resource_group is not defined or not azure_vnet_resource_group
|
||||
|
||||
- name: check azure_route_table_name value
|
||||
- name: Check azure_route_table_name value
|
||||
fail:
|
||||
msg: "azure_route_table_name is missing"
|
||||
when: azure_route_table_name is not defined or not azure_route_table_name
|
||||
|
||||
- name: check azure_loadbalancer_sku value
|
||||
- name: Check azure_loadbalancer_sku value
|
||||
fail:
|
||||
msg: "azure_loadbalancer_sku has an invalid value '{{ azure_loadbalancer_sku }}'. Supported values are 'basic', 'standard'"
|
||||
when: azure_loadbalancer_sku not in ["basic", "standard"]
|
||||
|
||||
- name: "check azure_exclude_master_from_standard_lb is a bool"
|
||||
- name: "Check azure_exclude_master_from_standard_lb is a bool"
|
||||
assert:
|
||||
that: azure_exclude_master_from_standard_lb | type_debug == 'bool'
|
||||
|
||||
- name: "check azure_disable_outbound_snat is a bool"
|
||||
- name: "Check azure_disable_outbound_snat is a bool"
|
||||
assert:
|
||||
that: azure_disable_outbound_snat | type_debug == 'bool'
|
||||
|
||||
- name: "check azure_use_instance_metadata is a bool"
|
||||
- name: "Check azure_use_instance_metadata is a bool"
|
||||
assert:
|
||||
that: azure_use_instance_metadata | type_debug == 'bool'
|
||||
|
||||
- name: check azure_vmtype value
|
||||
- name: Check azure_vmtype value
|
||||
fail:
|
||||
msg: "azure_vmtype is missing. Supported values are 'standard' or 'vmss'"
|
||||
when: azure_vmtype is not defined or not azure_vmtype
|
||||
|
||||
- name: check azure_cloud value
|
||||
- name: Check azure_cloud value
|
||||
fail:
|
||||
msg: "azure_cloud has an invalid value '{{ azure_cloud }}'. Supported values are 'AzureChinaCloud', 'AzureGermanCloud', 'AzurePublicCloud', 'AzureUSGovernmentCloud'."
|
||||
when: azure_cloud not in ["AzureChinaCloud", "AzureGermanCloud", "AzurePublicCloud", "AzureUSGovernmentCloud"]
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
---
|
||||
- name: check openstack_auth_url value
|
||||
- name: Check openstack_auth_url value
|
||||
fail:
|
||||
msg: "openstack_auth_url is missing"
|
||||
when: openstack_auth_url is not defined or not openstack_auth_url
|
||||
|
||||
- name: check openstack_username value
|
||||
- name: Check openstack_username value
|
||||
fail:
|
||||
msg: "openstack_username is missing"
|
||||
when: openstack_username is not defined or not openstack_username
|
||||
|
||||
- name: check openstack_password value
|
||||
- name: Check openstack_password value
|
||||
fail:
|
||||
msg: "openstack_password is missing"
|
||||
when: openstack_password is not defined or not openstack_password
|
||||
|
||||
- name: check openstack_region value
|
||||
- name: Check openstack_region value
|
||||
fail:
|
||||
msg: "openstack_region is missing"
|
||||
when: openstack_region is not defined or not openstack_region
|
||||
|
||||
- name: check openstack_tenant_id value
|
||||
- name: Check openstack_tenant_id value
|
||||
fail:
|
||||
msg: "one of openstack_tenant_id or openstack_trust_id must be specified"
|
||||
when:
|
||||
- openstack_tenant_id is not defined or not openstack_tenant_id
|
||||
- openstack_trust_id is not defined
|
||||
|
||||
- name: check openstack_trust_id value
|
||||
- name: Check openstack_trust_id value
|
||||
fail:
|
||||
msg: "one of openstack_tenant_id or openstack_trust_id must be specified"
|
||||
when:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: check vsphere environment variables
|
||||
- name: Check vsphere environment variables
|
||||
fail:
|
||||
msg: "{{ item.name }} is missing"
|
||||
when: item.value is not defined or not item.value
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
- block:
|
||||
- name: look up docker cgroup driver
|
||||
- name: Gather cgroups facts for docker
|
||||
block:
|
||||
- name: Look up docker cgroup driver
|
||||
shell: "set -o pipefail && docker info | grep 'Cgroup Driver' | awk -F': ' '{ print $2; }'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
@@ -8,47 +9,48 @@
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
|
||||
- name: set kubelet_cgroup_driver_detected fact for docker
|
||||
- name: Set kubelet_cgroup_driver_detected fact for docker
|
||||
set_fact:
|
||||
kubelet_cgroup_driver_detected: "{{ docker_cgroup_driver_result.stdout }}"
|
||||
when: container_manager == 'docker'
|
||||
|
||||
- block:
|
||||
- name: look up crio cgroup driver
|
||||
- name: Gather cgroups facts for crio
|
||||
block:
|
||||
- name: Look up crio cgroup driver
|
||||
shell: "set -o pipefail && {{ bin_dir }}/crio-status info | grep 'cgroup driver' | awk -F': ' '{ print $2; }'"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: crio_cgroup_driver_result
|
||||
changed_when: false
|
||||
|
||||
- name: set kubelet_cgroup_driver_detected fact for crio
|
||||
- name: Set kubelet_cgroup_driver_detected fact for crio
|
||||
set_fact:
|
||||
kubelet_cgroup_driver_detected: "{{ crio_cgroup_driver_result.stdout }}"
|
||||
when: container_manager == 'crio'
|
||||
|
||||
- name: set kubelet_cgroup_driver_detected fact for containerd
|
||||
- name: Set kubelet_cgroup_driver_detected fact for containerd
|
||||
set_fact:
|
||||
kubelet_cgroup_driver_detected: >-
|
||||
{%- if containerd_use_systemd_cgroup -%}systemd{%- else -%}cgroupfs{%- endif -%}
|
||||
when: container_manager == 'containerd'
|
||||
|
||||
- name: set kubelet_cgroup_driver
|
||||
- name: Set kubelet_cgroup_driver
|
||||
set_fact:
|
||||
kubelet_cgroup_driver: "{{ kubelet_cgroup_driver_detected }}"
|
||||
when: kubelet_cgroup_driver is undefined
|
||||
|
||||
- name: set kubelet_cgroups options when cgroupfs is used
|
||||
- name: Set kubelet_cgroups options when cgroupfs is used
|
||||
set_fact:
|
||||
kubelet_runtime_cgroups: "{{ kubelet_runtime_cgroups_cgroupfs }}"
|
||||
kubelet_kubelet_cgroups: "{{ kubelet_kubelet_cgroups_cgroupfs }}"
|
||||
when: kubelet_cgroup_driver == 'cgroupfs'
|
||||
|
||||
- name: set kubelet_config_extra_args options when cgroupfs is used
|
||||
- name: Set kubelet_config_extra_args options when cgroupfs is used
|
||||
set_fact:
|
||||
kubelet_config_extra_args: "{{ kubelet_config_extra_args | combine(kubelet_config_extra_args_cgroupfs) }}"
|
||||
when: kubelet_cgroup_driver == 'cgroupfs'
|
||||
|
||||
- name: os specific vars
|
||||
- name: Os specific vars
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- files:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: install | Copy kubeadm binary from download dir
|
||||
- name: Install | Copy kubeadm binary from download dir
|
||||
copy:
|
||||
src: "{{ downloads.kubeadm.dest }}"
|
||||
dest: "{{ bin_dir }}/kubeadm"
|
||||
@@ -10,7 +10,7 @@
|
||||
when:
|
||||
- not inventory_hostname in groups['kube_control_plane']
|
||||
|
||||
- name: install | Copy kubelet binary from download dir
|
||||
- name: Install | Copy kubelet binary from download dir
|
||||
copy:
|
||||
src: "{{ downloads.kubelet.dest }}"
|
||||
dest: "{{ bin_dir }}/kubelet"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
- kubelet
|
||||
- kubeadm
|
||||
|
||||
- name: flush_handlers and reload-systemd
|
||||
- name: Flush_handlers and reload-systemd
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Enable kubelet
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
---
|
||||
- name: haproxy | Cleanup potentially deployed nginx-proxy
|
||||
- name: Haproxy | Cleanup potentially deployed nginx-proxy
|
||||
file:
|
||||
path: "{{ kube_manifest_dir }}/nginx-proxy.yml"
|
||||
state: absent
|
||||
|
||||
- name: haproxy | Make haproxy directory
|
||||
- name: Haproxy | Make haproxy directory
|
||||
file:
|
||||
path: "{{ haproxy_config_dir }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
owner: root
|
||||
|
||||
- name: haproxy | Write haproxy configuration
|
||||
- name: Haproxy | Write haproxy configuration
|
||||
template:
|
||||
src: "loadbalancer/haproxy.cfg.j2"
|
||||
dest: "{{ haproxy_config_dir }}/haproxy.cfg"
|
||||
@@ -19,7 +19,7 @@
|
||||
mode: 0755
|
||||
backup: yes
|
||||
|
||||
- name: haproxy | Get checksum from config
|
||||
- name: Haproxy | Get checksum from config
|
||||
stat:
|
||||
path: "{{ haproxy_config_dir }}/haproxy.cfg"
|
||||
get_attributes: no
|
||||
@@ -27,7 +27,7 @@
|
||||
get_mime: no
|
||||
register: haproxy_stat
|
||||
|
||||
- name: haproxy | Write static pod
|
||||
- name: Haproxy | Write static pod
|
||||
template:
|
||||
src: manifests/haproxy.manifest.j2
|
||||
dest: "{{ kube_manifest_dir }}/haproxy.yml"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
---
|
||||
- name: kube-vip | Check cluster settings for kube-vip
|
||||
- name: Kube-vip | Check cluster settings for kube-vip
|
||||
fail:
|
||||
msg: "kube-vip require kube_proxy_strict_arp = true, see https://github.com/kube-vip/kube-vip/blob/main/docs/kubernetes/arp/index.md"
|
||||
when:
|
||||
- kube_proxy_mode == 'ipvs' and not kube_proxy_strict_arp
|
||||
- kube_vip_arp_enabled
|
||||
|
||||
- name: kube-vip | Write static pod
|
||||
- name: Kube-vip | Write static pod
|
||||
template:
|
||||
src: manifests/kube-vip.manifest.j2
|
||||
dest: "{{ kube_manifest_dir }}/kube-vip.yml"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
---
|
||||
- name: haproxy | Cleanup potentially deployed haproxy
|
||||
- name: Haproxy | Cleanup potentially deployed haproxy
|
||||
file:
|
||||
path: "{{ kube_manifest_dir }}/haproxy.yml"
|
||||
state: absent
|
||||
|
||||
- name: nginx-proxy | Make nginx directory
|
||||
- name: Nginx-proxy | Make nginx directory
|
||||
file:
|
||||
path: "{{ nginx_config_dir }}"
|
||||
state: directory
|
||||
mode: 0700
|
||||
owner: root
|
||||
|
||||
- name: nginx-proxy | Write nginx-proxy configuration
|
||||
- name: Nginx-proxy | Write nginx-proxy configuration
|
||||
template:
|
||||
src: "loadbalancer/nginx.conf.j2"
|
||||
dest: "{{ nginx_config_dir }}/nginx.conf"
|
||||
@@ -19,7 +19,7 @@
|
||||
mode: 0755
|
||||
backup: yes
|
||||
|
||||
- name: nginx-proxy | Get checksum from config
|
||||
- name: Nginx-proxy | Get checksum from config
|
||||
stat:
|
||||
path: "{{ nginx_config_dir }}/nginx.conf"
|
||||
get_attributes: no
|
||||
@@ -27,7 +27,7 @@
|
||||
get_mime: no
|
||||
register: nginx_stat
|
||||
|
||||
- name: nginx-proxy | Write static pod
|
||||
- name: Nginx-proxy | Write static pod
|
||||
template:
|
||||
src: manifests/nginx-proxy.manifest.j2
|
||||
dest: "{{ kube_manifest_dir }}/nginx-proxy.yml"
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
---
|
||||
- import_tasks: facts.yml
|
||||
- name: Fetch facts
|
||||
import_tasks: facts.yml
|
||||
tags:
|
||||
- facts
|
||||
|
||||
- import_tasks: pre_upgrade.yml
|
||||
- name: Pre-upgrade kubelet
|
||||
import_tasks: pre_upgrade.yml
|
||||
tags:
|
||||
- kubelet
|
||||
|
||||
@@ -13,18 +15,21 @@
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- import_tasks: install.yml
|
||||
- name: Install kubelet binary
|
||||
import_tasks: install.yml
|
||||
tags:
|
||||
- kubelet
|
||||
|
||||
- import_tasks: loadbalancer/kube-vip.yml
|
||||
- name: Install kube-vip
|
||||
import_tasks: loadbalancer/kube-vip.yml
|
||||
when:
|
||||
- is_kube_master
|
||||
- kube_vip_enabled
|
||||
tags:
|
||||
- kube-vip
|
||||
|
||||
- import_tasks: loadbalancer/nginx-proxy.yml
|
||||
- name: Install nginx-proxy
|
||||
import_tasks: loadbalancer/nginx-proxy.yml
|
||||
when:
|
||||
- not is_kube_master or kube_apiserver_bind_address != '0.0.0.0'
|
||||
- loadbalancer_apiserver_localhost
|
||||
@@ -32,7 +37,8 @@
|
||||
tags:
|
||||
- nginx
|
||||
|
||||
- import_tasks: loadbalancer/haproxy.yml
|
||||
- name: Install haproxy
|
||||
import_tasks: loadbalancer/haproxy.yml
|
||||
when:
|
||||
- not is_kube_master or kube_apiserver_bind_address != '0.0.0.0'
|
||||
- loadbalancer_apiserver_localhost
|
||||
@@ -141,7 +147,8 @@
|
||||
tags:
|
||||
- kube-proxy
|
||||
|
||||
- include_tasks: "cloud-credentials/{{ cloud_provider }}-credential-check.yml"
|
||||
- name: Check cloud provider credentials
|
||||
include_tasks: "cloud-credentials/{{ cloud_provider }}-credential-check.yml"
|
||||
when:
|
||||
- cloud_provider is defined
|
||||
- cloud_provider in [ 'openstack', 'azure', 'vsphere' ]
|
||||
@@ -187,7 +194,8 @@
|
||||
tags:
|
||||
- cloud-provider
|
||||
|
||||
- import_tasks: kubelet.yml
|
||||
- name: Install kubelet
|
||||
import_tasks: kubelet.yml
|
||||
tags:
|
||||
- kubelet
|
||||
- kubeadm
|
||||
|
||||
Reference in New Issue
Block a user