From 0863a440c59104e90b864592f066bf025a8eb74d Mon Sep 17 00:00:00 2001 From: Fabian von Feilitzsch Date: Mon, 17 Feb 2020 16:42:32 -0500 Subject: [PATCH] Fix paths to properly use FQCN where necessary --- molecule/default/tasks/log.yml | 6 +++--- plugins/modules/k8s_log.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/molecule/default/tasks/log.yml b/molecule/default/tasks/log.yml index ba9d80b9..75322a37 100644 --- a/molecule/default/tasks/log.yml +++ b/molecule/default/tasks/log.yml @@ -31,7 +31,7 @@ restartPolicy: Always - name: retrieve the log by providing the deployment - community.kubernetes.k8s_log: + k8s_log: api_version: apps/v1 kind: Deployment namespace: k8s-log @@ -46,7 +46,7 @@ with_items: '{{ deployment_log.log_lines }}' - name: retrieve the log with a label selector - community.kubernetes.k8s_log: + k8s_log: namespace: k8s-log label_selectors: - 'app=hello-world' @@ -68,7 +68,7 @@ register: k8s_log_pods - name: retrieve the log directly with the pod name - community.kubernetes.k8s_log: + k8s_log: namespace: k8s-log name: '{{ k8s_log_pods.resources.0.metadata.name }}' register: pod_log diff --git a/plugins/modules/k8s_log.py b/plugins/modules/k8s_log.py index bc5bb2c3..252ff44c 100644 --- a/plugins/modules/k8s_log.py +++ b/plugins/modules/k8s_log.py @@ -123,8 +123,9 @@ ''' -from ansible.module_utils.k8s.common import KubernetesAnsibleModule, AUTH_ARG_SPEC import copy +from ansible_collections.community.kubernetes.plugins.module_utils.common import KubernetesAnsibleModule +from ansible_collections.community.kubernetes.plugins.module_utils.common import AUTH_ARG_SPEC class KubernetesLogModule(KubernetesAnsibleModule):