mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-07 13:32:37 +00:00
Fix apply on Ansible 2.9 (#135)
* Fix apply on Ansible 2.9 For some reason the apply function can't be correctly imported in Ansible 2.9. This just renames it to get it to import. I've also added molecule testing on multiple Ansible versions. * Add changelog fragment
This commit is contained in:
@@ -110,7 +110,7 @@ def apply_object(resource, definition):
|
||||
return apply_patch(actual.to_dict(), definition)
|
||||
|
||||
|
||||
def apply(resource, definition):
|
||||
def k8s_apply(resource, definition):
|
||||
existing, desired = apply_object(resource, definition)
|
||||
if not existing:
|
||||
return resource.create(body=desired, namespace=definition['metadata'].get('namespace'))
|
||||
|
||||
Reference in New Issue
Block a user