mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-08 22:12:44 +00:00
Fix paths to properly use FQCN where necessary
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
|
|
||||||
- name: retrieve the log by providing the deployment
|
- name: retrieve the log by providing the deployment
|
||||||
community.kubernetes.k8s_log:
|
k8s_log:
|
||||||
api_version: apps/v1
|
api_version: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
namespace: k8s-log
|
namespace: k8s-log
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
with_items: '{{ deployment_log.log_lines }}'
|
with_items: '{{ deployment_log.log_lines }}'
|
||||||
|
|
||||||
- name: retrieve the log with a label selector
|
- name: retrieve the log with a label selector
|
||||||
community.kubernetes.k8s_log:
|
k8s_log:
|
||||||
namespace: k8s-log
|
namespace: k8s-log
|
||||||
label_selectors:
|
label_selectors:
|
||||||
- 'app=hello-world'
|
- 'app=hello-world'
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
register: k8s_log_pods
|
register: k8s_log_pods
|
||||||
|
|
||||||
- name: retrieve the log directly with the pod name
|
- name: retrieve the log directly with the pod name
|
||||||
community.kubernetes.k8s_log:
|
k8s_log:
|
||||||
namespace: k8s-log
|
namespace: k8s-log
|
||||||
name: '{{ k8s_log_pods.resources.0.metadata.name }}'
|
name: '{{ k8s_log_pods.resources.0.metadata.name }}'
|
||||||
register: pod_log
|
register: pod_log
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ options:
|
|||||||
required: no
|
required: no
|
||||||
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- k8s_auth_options
|
- community.kubernetes.k8s_auth_options
|
||||||
|
|
||||||
requirements:
|
requirements:
|
||||||
- "python >= 2.7"
|
- "python >= 2.7"
|
||||||
@@ -123,8 +123,9 @@ log_lines:
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
from ansible.module_utils.k8s.common import KubernetesAnsibleModule, AUTH_ARG_SPEC
|
|
||||||
import copy
|
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):
|
class KubernetesLogModule(KubernetesAnsibleModule):
|
||||||
|
|||||||
Reference in New Issue
Block a user