mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-06 13:02:37 +00:00
fix
This commit is contained in:
@@ -242,7 +242,7 @@ class K8sAnsibleMixin(object):
|
||||
self.fail(msg='Failed to find exact match for {0}.{1} by [kind, name, singularName, shortNames]'.format(api_version, kind))
|
||||
|
||||
def kubernetes_facts(self, kind, api_version, name=None, namespace=None, label_selectors=None, field_selectors=None,
|
||||
wait=False, wait_sleep=5, wait_timeout=120, state='present', condition=None, wait_property=None):
|
||||
wait=False, wait_sleep=5, wait_timeout=120, state='present', condition=None, property=None):
|
||||
resource = self.find_resource(kind, api_version)
|
||||
api_found = bool(resource)
|
||||
if not api_found:
|
||||
@@ -298,7 +298,7 @@ class K8sAnsibleMixin(object):
|
||||
for resource_instance in resource_list:
|
||||
success, res, duration = self.wait(resource, resource_instance,
|
||||
sleep=wait_sleep, timeout=wait_timeout,
|
||||
state=state, condition=condition, wait_property=wait_property)
|
||||
state=state, condition=condition, property=property)
|
||||
if not success:
|
||||
self.fail(msg="Failed to gather information about %s(s) even"
|
||||
" after waiting for %s seconds" % (res.get('kind'), duration))
|
||||
|
||||
@@ -140,6 +140,7 @@ requirements:
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "PyYAML >= 3.11"
|
||||
- "jsonpatch"
|
||||
- "jmespath"
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
@@ -249,6 +250,7 @@ EXAMPLES = r'''
|
||||
wait_condition:
|
||||
type: Progressing
|
||||
status: Unknown
|
||||
reason: DeploymentPaused
|
||||
|
||||
# Wait for this service to have acquired an External IP
|
||||
- name: Create ingress and wait for ip to be assigned
|
||||
|
||||
@@ -52,7 +52,7 @@ requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "PyYAML >= 3.11"
|
||||
- "jsonpath-rw"
|
||||
- "jmespath"
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
@@ -165,7 +165,7 @@ def execute_module(module, k8s_ansible_mixin):
|
||||
wait_sleep=module.params["wait_sleep"],
|
||||
wait_timeout=module.params["wait_timeout"],
|
||||
condition=module.params["wait_condition"],
|
||||
wait_for=module.params["wait_for"]
|
||||
property=module.params["wait_property"]
|
||||
)
|
||||
module.exit_json(changed=False, **facts)
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ requirements:
|
||||
- "python >= 3.6"
|
||||
- "kubernetes >= 12.0.0"
|
||||
- "PyYAML >= 3.11"
|
||||
- "jsonpath-rw"
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
|
||||
Reference in New Issue
Block a user