mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-20 07:17:45 -02:30
Do not use ‘yes/no’ for boolean values (#11472)
Consistent boolean values in ansible playbooks
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
src: "{{ downloads.calicoctl.dest }}"
|
||||
dest: "{{ bin_dir }}/calicoctl"
|
||||
mode: "0755"
|
||||
remote_src: yes
|
||||
remote_src: true
|
||||
|
||||
- name: Calico | Create calico certs directory
|
||||
file:
|
||||
@@ -31,7 +31,7 @@
|
||||
dest: "{{ calico_cert_dir }}/{{ item.d }}"
|
||||
state: hard
|
||||
mode: "0640"
|
||||
force: yes
|
||||
force: true
|
||||
with_items:
|
||||
- {s: "{{ kube_etcd_cacert_file }}", d: "ca_cert.crt"}
|
||||
- {s: "{{ kube_etcd_cert_file }}", d: "cert.crt"}
|
||||
@@ -61,7 +61,7 @@
|
||||
- name: Calico | wait for etcd
|
||||
uri:
|
||||
url: "{{ etcd_access_addresses.split(',') | first }}/health"
|
||||
validate_certs: no
|
||||
validate_certs: false
|
||||
client_cert: "{{ calico_cert_dir }}/cert.crt"
|
||||
client_key: "{{ calico_cert_dir }}/key.pem"
|
||||
register: result
|
||||
@@ -165,8 +165,8 @@
|
||||
- name: Calico | Get existing FelixConfiguration
|
||||
command: "{{ bin_dir }}/calicoctl.sh get felixconfig default -o json"
|
||||
register: _felix_cmd
|
||||
ignore_errors: True
|
||||
changed_when: False
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Calico | Set kubespray FelixConfiguration
|
||||
set_fact:
|
||||
@@ -201,7 +201,7 @@
|
||||
command:
|
||||
cmd: "{{ bin_dir }}/calicoctl.sh apply -f -"
|
||||
stdin: "{{ _felix_config is string | ternary(_felix_config, _felix_config | to_json) }}"
|
||||
changed_when: False
|
||||
changed_when: false
|
||||
|
||||
- name: Calico | Configure Calico IP Pool
|
||||
when:
|
||||
@@ -210,8 +210,8 @@
|
||||
- name: Calico | Get existing calico network pool
|
||||
command: "{{ bin_dir }}/calicoctl.sh get ippool {{ calico_pool_name }} -o json"
|
||||
register: _calico_pool_cmd
|
||||
ignore_errors: True
|
||||
changed_when: False
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Calico | Set kubespray calico network pool
|
||||
set_fact:
|
||||
@@ -251,7 +251,7 @@
|
||||
command:
|
||||
cmd: "{{ bin_dir }}/calicoctl.sh apply -f -"
|
||||
stdin: "{{ _calico_pool is string | ternary(_calico_pool, _calico_pool | to_json) }}"
|
||||
changed_when: False
|
||||
changed_when: false
|
||||
|
||||
- name: Calico | Configure Calico IPv6 Pool
|
||||
when:
|
||||
@@ -261,8 +261,8 @@
|
||||
- name: Calico | Get existing calico ipv6 network pool
|
||||
command: "{{ bin_dir }}/calicoctl.sh get ippool {{ calico_pool_name }}-ipv6 -o json"
|
||||
register: _calico_pool_ipv6_cmd
|
||||
ignore_errors: True
|
||||
changed_when: False
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Calico | Set kubespray calico network pool
|
||||
set_fact:
|
||||
@@ -302,19 +302,19 @@
|
||||
command:
|
||||
cmd: "{{ bin_dir }}/calicoctl.sh apply -f -"
|
||||
stdin: "{{ _calico_pool_ipv6 is string | ternary(_calico_pool_ipv6, _calico_pool_ipv6 | to_json) }}"
|
||||
changed_when: False
|
||||
changed_when: false
|
||||
|
||||
- name: Populate Service External IPs
|
||||
set_fact:
|
||||
_service_external_ips: "{{ _service_external_ips | default([]) + [{'cidr': item}] }}"
|
||||
with_items: "{{ calico_advertise_service_external_ips }}"
|
||||
run_once: yes
|
||||
run_once: true
|
||||
|
||||
- name: Populate Service LoadBalancer IPs
|
||||
set_fact:
|
||||
_service_loadbalancer_ips: "{{ _service_loadbalancer_ips | default([]) + [{'cidr': item}] }}"
|
||||
with_items: "{{ calico_advertise_service_loadbalancer_ips }}"
|
||||
run_once: yes
|
||||
run_once: true
|
||||
|
||||
- name: "Determine nodeToNodeMesh needed state"
|
||||
set_fact:
|
||||
@@ -322,7 +322,7 @@
|
||||
when:
|
||||
- peer_with_router | default(false) or peer_with_calico_rr | default(false)
|
||||
- inventory_hostname in groups['k8s_cluster']
|
||||
run_once: yes
|
||||
run_once: true
|
||||
|
||||
- name: Calico | Configure Calico BGP
|
||||
when:
|
||||
@@ -331,8 +331,8 @@
|
||||
- name: Calico | Get existing BGP Configuration
|
||||
command: "{{ bin_dir }}/calicoctl.sh get bgpconfig default -o json"
|
||||
register: _bgp_config_cmd
|
||||
ignore_errors: True
|
||||
changed_when: False
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
||||
- name: Calico | Set kubespray BGP Configuration
|
||||
set_fact:
|
||||
@@ -366,7 +366,7 @@
|
||||
command:
|
||||
cmd: "{{ bin_dir }}/calicoctl.sh apply -f -"
|
||||
stdin: "{{ _bgp_config is string | ternary(_bgp_config, _bgp_config | to_json) }}"
|
||||
changed_when: False
|
||||
changed_when: false
|
||||
|
||||
- name: Calico | Create calico manifests
|
||||
template:
|
||||
|
||||
Reference in New Issue
Block a user