mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-13 12:27:39 -02:30
ansible-lint: don't compare to empty string [E602] (#4665)
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
f518b90c6b
commit
88d919337e
@@ -3,56 +3,65 @@
|
||||
- name: "OCI Cloud Controller | Credentials Check | oci_private_key"
|
||||
fail:
|
||||
msg: "oci_private_key is missing"
|
||||
when: (not oci_use_instance_principals) and
|
||||
(oci_private_key is not defined or oci_private_key == "")
|
||||
when:
|
||||
- not oci_use_instance_principals
|
||||
- oci_private_key is not defined or not oci_private_key
|
||||
|
||||
- name: "OCI Cloud Controller | Credentials Check | oci_region_id"
|
||||
fail:
|
||||
msg: "oci_region_id is missing"
|
||||
when: (not oci_use_instance_principals) and
|
||||
(oci_region_id is not defined or oci_region_id == "")
|
||||
when:
|
||||
- not oci_use_instance_principals
|
||||
- oci_region_id is not defined or not oci_region_id
|
||||
|
||||
- name: "OCI Cloud Controller | Credentials Check | oci_tenancy_id"
|
||||
fail:
|
||||
msg: "oci_tenancy_id is missing"
|
||||
when: (not oci_use_instance_principals) and
|
||||
(oci_tenancy_id is not defined or oci_tenancy_id == "")
|
||||
when:
|
||||
- not oci_use_instance_principals
|
||||
- oci_tenancy_id is not defined or not oci_tenancy_id
|
||||
|
||||
- name: "OCI Cloud Controller | Credentials Check | oci_user_id"
|
||||
fail:
|
||||
msg: "oci_user_id is missing"
|
||||
when: (not oci_use_instance_principals) and
|
||||
(oci_user_id is not defined or oci_user_id == "")
|
||||
when:
|
||||
- not oci_use_instance_principals
|
||||
- oci_user_id is not defined or not oci_user_id
|
||||
|
||||
- name: "OCI Cloud Controller | Credentials Check | oci_user_fingerprint"
|
||||
fail:
|
||||
msg: "oci_user_fingerprint is missing"
|
||||
when: (not oci_use_instance_principals) and
|
||||
(oci_user_fingerprint is not defined or oci_user_fingerprint == "")
|
||||
when:
|
||||
- not oci_use_instance_principals
|
||||
- oci_user_fingerprint is not defined or not oci_user_fingerprint
|
||||
|
||||
- name: "OCI Cloud Controller | Credentials Check | oci_compartment_id"
|
||||
fail:
|
||||
msg: "oci_compartment_id is missing. This is the compartment in which the cluster resides"
|
||||
when: oci_compartment_id is not defined or oci_compartment_id == ""
|
||||
when:
|
||||
- oci_compartment_id is not defined or not oci_compartment_id
|
||||
|
||||
- name: "OCI Cloud Controller | Credentials Check | oci_vnc_id"
|
||||
fail:
|
||||
msg: "oci_vnc_id is missin. This is the Virtual Cloud Network in which the cluster resides"
|
||||
when: oci_vnc_id is not defined or oci_vnc_id == ""
|
||||
when:
|
||||
- oci_vnc_id is not defined or not oci_vnc_id
|
||||
|
||||
- name: "OCI Cloud Controller | Credentials Check | oci_subnet1_id"
|
||||
fail:
|
||||
msg: "oci_subnet1_id is missing. This is the first subnet to which loadbalancers will be added"
|
||||
when: oci_subnet1_id is not defined or oci_subnet1_id == ""
|
||||
when:
|
||||
- oci_subnet1_id is not defined or not oci_subnet1_id
|
||||
|
||||
- name: "OCI Cloud Controller | Credentials Check | oci_subnet2_id"
|
||||
fail:
|
||||
msg: "oci_subnet2_id is missing. Two subnets are required for load balancer high availability"
|
||||
when:
|
||||
- oci_cloud_controller_version | version_compare('0.7.0', '<')
|
||||
- oci_subnet2_id is not defined or oci_subnet2_id == ""
|
||||
- oci_cloud_controller_version | version_compare('0.7.0', '<')
|
||||
- oci_subnet2_id is not defined or not oci_subnet2_id
|
||||
|
||||
- name: "OCI Cloud Controller | Credentials Check | oci_security_list_management"
|
||||
fail:
|
||||
msg: "oci_security_list_management is missing, or not defined correctly. Valid options are (All, Frontend, None)."
|
||||
when: oci_security_list_management is not defined or oci_security_list_management not in ["All", "Frontend", "None"]
|
||||
when:
|
||||
- oci_security_list_management is not defined or oci_security_list_management not in ["All", "Frontend", "None"]
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
{% if rbac_enabled %} --service-account=tiller{% endif %}
|
||||
{% if tiller_node_selectors is defined %} --node-selectors {{ tiller_node_selectors }}{% endif %}
|
||||
{% if kube_version is version('v1.11.1', '>=') %} --override spec.template.spec.priorityClassName={% if tiller_namespace == 'kube-system' %}system-cluster-critical{% else %}k8s-cluster-critical{% endif %}{% endif %}
|
||||
{% if tiller_override is defined and tiller_override != "" %} --override {{ tiller_override }}{% endif %}
|
||||
{% if tiller_override is defined and tiller_override %} --override {{ tiller_override }}{% endif %}
|
||||
{% if tiller_max_history is defined %} --history-max={{ tiller_max_history }}{% endif %}
|
||||
{% if tiller_enable_tls %} --tiller-tls --tiller-tls-verify --tiller-tls-cert={{ tiller_tls_cert }} --tiller-tls-key={{ tiller_tls_key }} --tls-ca-cert={{ tiller_tls_ca_cert }} {% endif %}
|
||||
{% if tiller_secure_release_info %} --override 'spec.template.spec.containers[0].command'='{/tiller,--storage=secret}' {% endif %}
|
||||
@@ -67,7 +67,7 @@
|
||||
{% if rbac_enabled %} --service-account=tiller{% endif %}
|
||||
{% if tiller_node_selectors is defined %} --node-selectors {{ tiller_node_selectors }}{% endif %}
|
||||
{% if kube_version is version('v1.11.1', '>=') %} --override spec.template.spec.priorityClassName={% if tiller_namespace == 'kube-system' %}system-cluster-critical{% else %}k8s-cluster-critical{% endif %}{% endif %}
|
||||
{% if tiller_override is defined and tiller_override != "" %} --override {{ tiller_override }}{% endif %}
|
||||
{% if tiller_override is defined and tiller_override %} --override {{ tiller_override }}{% endif %}
|
||||
{% if tiller_max_history is defined %} --history-max={{ tiller_max_history }}{% endif %}
|
||||
{% if tiller_enable_tls %} --tiller-tls --tiller-tls-verify --tiller-tls-cert={{ tiller_tls_cert }} --tiller-tls-key={{ tiller_tls_key }} --tls-ca-cert={{ tiller_tls_ca_cert }} {% endif %}
|
||||
{% if tiller_secure_release_info %} --override 'spec.template.spec.containers[0].command'='{/tiller,--storage=secret}' {% endif %}
|
||||
@@ -76,7 +76,7 @@
|
||||
| {{bin_dir}}/kubectl apply -f -
|
||||
changed_when: false
|
||||
when:
|
||||
- (tiller_override is defined and tiller_override != "") or (kube_version is version('v1.11.1', '>='))
|
||||
- (tiller_override is defined and tiller_override) or (kube_version is version('v1.11.1', '>='))
|
||||
- inventory_hostname == groups['kube-master'][0]
|
||||
environment: "{{proxy_env}}"
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
- { name: registry-pvc, file: registry-pvc.yml, type: pvc }
|
||||
register: registry_manifests
|
||||
when:
|
||||
- registry_storage_class != none and registry_storage_class != ""
|
||||
- registry_disk_size != none and registry_disk_size != ""
|
||||
- registry_storage_class != none and registry_storage_class
|
||||
- registry_disk_size != none and registry_disk_size
|
||||
- inventory_hostname == groups['kube-master'][0]
|
||||
|
||||
- name: Registry | Apply PVC manifests
|
||||
@@ -73,6 +73,6 @@
|
||||
state: "latest"
|
||||
with_items: "{{ registry_manifests.results }}"
|
||||
when:
|
||||
- registry_storage_class != none and registry_storage_class != ""
|
||||
- registry_disk_size != none and registry_disk_size != ""
|
||||
- registry_storage_class != none and registry_storage_class
|
||||
- registry_disk_size != none and registry_disk_size
|
||||
- inventory_hostname == groups['kube-master'][0]
|
||||
|
||||
Reference in New Issue
Block a user