mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2025-01-07 10:10:19 +01:00
fixed kubectl_get_nodes_result.stdout error
os ubuntu amd64 16.04 LTS ansible 2.9.20 python version 2.7 ``` FAILED! => {"msg": "The conditional check 'item in kubectl_get_nodes_result.stdout' failed. The error was: error while evaluating conditional (item in kubectl_get_nodes_result.stdout): 'dict object' has no attribute 'stdout'\n\nThe error appears to be in '/home/rancher/.ansible/roles/xanmanning.k3s/tasks/teardown/drain-and-remove-nodes.yml': line 39, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Ensure uninstalled nodes are removed\n ^ here\n"} ```
This commit is contained in:
parent
2432a7d25f
commit
91d456ccad
1 changed files with 2 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
|||
delegate_to: "{{ k3s_control_delegate }}"
|
||||
run_once: true
|
||||
when:
|
||||
- kubectl_get_nodes_result.stdout is defined
|
||||
- item in kubectl_get_nodes_result.stdout
|
||||
- hostvars[item].k3s_state is defined
|
||||
- hostvars[item].k3s_state == 'uninstalled'
|
||||
|
@ -41,6 +42,7 @@
|
|||
delegate_to: "{{ k3s_control_delegate }}"
|
||||
run_once: true
|
||||
when:
|
||||
- kubectl_get_nodes_result.stdout is defined
|
||||
- item in kubectl_get_nodes_result.stdout
|
||||
- hostvars[item].k3s_state is defined
|
||||
- hostvars[item].k3s_state == 'uninstalled'
|
||||
|
|
Loading…
Reference in a new issue