mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-06 13:02:37 +00:00
fix drain test for ansible 2.9 release (#211)
Test molecule on ansible release 2.9 and 2.10 SUMMARY Debug only ISSUE TYPE Feature Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: None <None>
This commit is contained in:
@@ -177,8 +177,9 @@
|
||||
k8s_info:
|
||||
namespace: '{{ drain_namespace }}'
|
||||
kind: Pod
|
||||
name: '{{ drain_pod_name }}'
|
||||
register: _result
|
||||
failed_when: _result.resources | selectattr("metadata.ownerReferences", "undefined") | length > 0
|
||||
failed_when: _result.resources
|
||||
|
||||
- name: Test drain idempotency
|
||||
k8s_drain:
|
||||
@@ -212,6 +213,13 @@
|
||||
name: '{{ node_to_drain }}'
|
||||
|
||||
always:
|
||||
- name: Uncordon node
|
||||
k8s_drain:
|
||||
state: uncordon
|
||||
name: '{{ node_to_drain }}'
|
||||
when: node_to_drain is defined
|
||||
ignore_errors: true
|
||||
|
||||
- name: delete namespace
|
||||
k8s:
|
||||
state: absent
|
||||
|
||||
Reference in New Issue
Block a user