mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-01 09:38:12 -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
@@ -5,7 +5,7 @@
|
||||
register: nodes
|
||||
when:
|
||||
- groups['kube_control_plane'] | length > 0
|
||||
delegate_to: "{{ groups['kube_control_plane']|first }}"
|
||||
delegate_to: "{{ groups['kube_control_plane'] | first }}"
|
||||
changed_when: false
|
||||
run_once: true
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
--ignore-daemonsets
|
||||
--grace-period {{ drain_grace_period }}
|
||||
--timeout {{ drain_timeout }}
|
||||
--delete-emptydir-data {{ kube_override_hostname|default(inventory_hostname) }}
|
||||
--delete-emptydir-data {{ kube_override_hostname | default(inventory_hostname) }}
|
||||
when:
|
||||
- groups['kube_control_plane'] | length > 0
|
||||
# ignore servers that are not nodes
|
||||
- kube_override_hostname|default(inventory_hostname) in nodes.stdout_lines
|
||||
- kube_override_hostname | default(inventory_hostname) in nodes.stdout_lines
|
||||
register: result
|
||||
failed_when: result.rc != 0 and not allow_ungraceful_removal
|
||||
delegate_to: "{{ groups['kube_control_plane']|first }}"
|
||||
delegate_to: "{{ groups['kube_control_plane'] | first }}"
|
||||
until: result.rc == 0 or allow_ungraceful_removal
|
||||
retries: "{{ drain_retries }}"
|
||||
delay: "{{ drain_retry_delay_seconds }}"
|
||||
@@ -32,12 +32,12 @@
|
||||
command: >-
|
||||
{{ kubectl }} get volumeattachments -o go-template={% raw %}'{{ range .items }}{{ .spec.nodeName }}{{ "\n" }}{{ end }}'{% endraw %}
|
||||
register: nodes_with_volumes
|
||||
delegate_to: "{{ groups['kube_control_plane']|first }}"
|
||||
delegate_to: "{{ groups['kube_control_plane'] | first }}"
|
||||
changed_when: false
|
||||
until: not (kube_override_hostname|default(inventory_hostname) in nodes_with_volumes.stdout_lines)
|
||||
until: not (kube_override_hostname | default(inventory_hostname) in nodes_with_volumes.stdout_lines)
|
||||
retries: 3
|
||||
delay: "{{ drain_grace_period }}"
|
||||
when:
|
||||
- groups['kube_control_plane'] | length > 0
|
||||
- not allow_ungraceful_removal
|
||||
- kube_override_hostname|default(inventory_hostname) in nodes.stdout_lines
|
||||
- kube_override_hostname | default(inventory_hostname) in nodes.stdout_lines
|
||||
|
||||
Reference in New Issue
Block a user