mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-08 05:52:37 +00:00
Merge pull request #59 from ansible-collections/49-fixup
Remaining fixes from diff on auto-migrated collection.
This commit is contained in:
@@ -32,8 +32,6 @@ DOCUMENTATION = """
|
|||||||
- Use the kubectl exec command to run tasks in, or put/fetch files to, pods running on the Kubernetes
|
- Use the kubectl exec command to run tasks in, or put/fetch files to, pods running on the Kubernetes
|
||||||
container platform.
|
container platform.
|
||||||
|
|
||||||
version_added: "2.5"
|
|
||||||
|
|
||||||
requirements:
|
requirements:
|
||||||
- kubectl (go binary)
|
- kubectl (go binary)
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ options:
|
|||||||
description:
|
description:
|
||||||
- The URL of an HTTP proxy to use for the connection. Can also be specified via K8S_AUTH_PROXY environment variable.
|
- The URL of an HTTP proxy to use for the connection. Can also be specified via K8S_AUTH_PROXY environment variable.
|
||||||
- Please note that this module does not pick up typical proxy settings from the environment (e.g. HTTP_PROXY).
|
- Please note that this module does not pick up typical proxy settings from the environment (e.g. HTTP_PROXY).
|
||||||
version_added: "2.9"
|
|
||||||
type: str
|
type: str
|
||||||
persist_config:
|
persist_config:
|
||||||
description:
|
description:
|
||||||
@@ -88,7 +87,6 @@ options:
|
|||||||
- Please note that the current version of the k8s python client library does not support setting this flag to True yet.
|
- Please note that the current version of the k8s python client library does not support setting this flag to True yet.
|
||||||
- "The fix for this k8s python library is here: https://github.com/kubernetes-client/python-base/pull/169"
|
- "The fix for this k8s python library is here: https://github.com/kubernetes-client/python-base/pull/169"
|
||||||
type: bool
|
type: bool
|
||||||
version_added: "2.10"
|
|
||||||
notes:
|
notes:
|
||||||
- "The OpenShift Python client wraps the K8s Python client, providing full access to
|
- "The OpenShift Python client wraps the K8s Python client, providing full access to
|
||||||
all of the APIS and models available on both platforms. For API version details and
|
all of the APIS and models available on both platforms. For API version details and
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ class K8sInventoryException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable, K8sAnsibleMixin):
|
class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable, K8sAnsibleMixin):
|
||||||
NAME = 'k8s'
|
NAME = 'community.kubernetes.k8s'
|
||||||
|
|
||||||
transport = 'kubectl'
|
transport = 'kubectl'
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ connections:
|
|||||||
context: 'awx/192-168-64-4:8443/developer'
|
context: 'awx/192-168-64-4:8443/developer'
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.plugins.inventory.k8s import K8sInventoryException, InventoryModule as K8sInventoryModule, format_dynamic_api_exc
|
from ansible_collections.community.kubernetes.plugins.inventory.k8s import K8sInventoryException, InventoryModule as K8sInventoryModule, format_dynamic_api_exc
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from openshift.dynamic.exceptions import DynamicApiError
|
from openshift.dynamic.exceptions import DynamicApiError
|
||||||
@@ -121,7 +121,7 @@ except ImportError:
|
|||||||
|
|
||||||
|
|
||||||
class InventoryModule(K8sInventoryModule):
|
class InventoryModule(K8sInventoryModule):
|
||||||
NAME = 'openshift'
|
NAME = 'community.kubernetes.openshift'
|
||||||
|
|
||||||
transport = 'oc'
|
transport = 'oc'
|
||||||
|
|
||||||
|
|||||||
@@ -20,11 +20,9 @@ from __future__ import (absolute_import, division, print_function)
|
|||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = """
|
DOCUMENTATION = '''
|
||||||
lookup: k8s
|
lookup: k8s
|
||||||
|
|
||||||
version_added: "2.5"
|
|
||||||
|
|
||||||
short_description: Query the K8s API
|
short_description: Query the K8s API
|
||||||
|
|
||||||
description:
|
description:
|
||||||
@@ -130,7 +128,7 @@ DOCUMENTATION = """
|
|||||||
- "The OpenShift Python client wraps the K8s Python client, providing full access to
|
- "The OpenShift Python client wraps the K8s Python client, providing full access to
|
||||||
all of the APIS and models available on both platforms. For API version details and
|
all of the APIS and models available on both platforms. For API version details and
|
||||||
additional information visit https://github.com/openshift/openshift-restclient-python"
|
additional information visit https://github.com/openshift/openshift-restclient-python"
|
||||||
"""
|
'''
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
- name: Fetch a list of namespaces
|
- name: Fetch a list of namespaces
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ module: k8s
|
|||||||
|
|
||||||
short_description: Manage Kubernetes (K8s) objects
|
short_description: Manage Kubernetes (K8s) objects
|
||||||
|
|
||||||
version_added: "2.6"
|
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- "Chris Houseknecht (@chouseknecht)"
|
- "Chris Houseknecht (@chouseknecht)"
|
||||||
- "Fabian von Feilitzsch (@fabianvf)"
|
- "Fabian von Feilitzsch (@fabianvf)"
|
||||||
@@ -67,7 +65,6 @@ options:
|
|||||||
- strategic-merge
|
- strategic-merge
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
version_added: "2.7"
|
|
||||||
wait:
|
wait:
|
||||||
description:
|
description:
|
||||||
- Whether to wait for certain resource kinds to end up in the desired state. By default the module exits once Kubernetes has
|
- Whether to wait for certain resource kinds to end up in the desired state. By default the module exits once Kubernetes has
|
||||||
@@ -76,19 +73,16 @@ options:
|
|||||||
- For resource kinds without an implementation, C(wait) returns immediately unless C(wait_condition) is set.
|
- For resource kinds without an implementation, C(wait) returns immediately unless C(wait_condition) is set.
|
||||||
default: no
|
default: no
|
||||||
type: bool
|
type: bool
|
||||||
version_added: "2.8"
|
|
||||||
wait_sleep:
|
wait_sleep:
|
||||||
description:
|
description:
|
||||||
- Number of seconds to sleep between checks.
|
- Number of seconds to sleep between checks.
|
||||||
default: 5
|
default: 5
|
||||||
type: int
|
type: int
|
||||||
version_added: "2.9"
|
|
||||||
wait_timeout:
|
wait_timeout:
|
||||||
description:
|
description:
|
||||||
- How long in seconds to wait for the resource to end up in the desired state. Ignored if C(wait) is not set.
|
- How long in seconds to wait for the resource to end up in the desired state. Ignored if C(wait) is not set.
|
||||||
default: 120
|
default: 120
|
||||||
type: int
|
type: int
|
||||||
version_added: "2.8"
|
|
||||||
wait_condition:
|
wait_condition:
|
||||||
description:
|
description:
|
||||||
- Specifies a custom condition on the status to wait for. Ignored if C(wait) is not set or is set to False.
|
- Specifies a custom condition on the status to wait for. Ignored if C(wait) is not set or is set to False.
|
||||||
@@ -114,11 +108,10 @@ options:
|
|||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- The value of the reason field in your desired condition
|
- The value of the reason field in your desired condition
|
||||||
- For example, if a C(Deployment) is paused, The C(Progressing) c(type) will have the C(DeploymentPaused) reason.
|
- For example, if a C(Deployment) is paused, The C(Progressing) C(type) will have the C(DeploymentPaused) reason.
|
||||||
- The possible reasons in a condition are specific to each resource type in Kubernetes. See the API documentation of the status field
|
- The possible reasons in a condition are specific to each resource type in Kubernetes. See the API documentation of the status field
|
||||||
for a given resource to see possible choices.
|
for a given resource to see possible choices.
|
||||||
type: dict
|
type: dict
|
||||||
version_added: "2.8"
|
|
||||||
validate:
|
validate:
|
||||||
description:
|
description:
|
||||||
- how (if at all) to validate the resource definition against the kubernetes schema.
|
- how (if at all) to validate the resource definition against the kubernetes schema.
|
||||||
@@ -135,7 +128,6 @@ options:
|
|||||||
default: True
|
default: True
|
||||||
type: bool
|
type: bool
|
||||||
type: dict
|
type: dict
|
||||||
version_added: "2.8"
|
|
||||||
append_hash:
|
append_hash:
|
||||||
description:
|
description:
|
||||||
- Whether to append a hash to a resource name for immutability purposes
|
- Whether to append a hash to a resource name for immutability purposes
|
||||||
@@ -145,7 +137,6 @@ options:
|
|||||||
will only work if the same object is passed with state=absent (alternatively, just use state=absent with the name including
|
will only work if the same object is passed with state=absent (alternatively, just use state=absent with the name including
|
||||||
the generated hash and append_hash=no)
|
the generated hash and append_hash=no)
|
||||||
type: bool
|
type: bool
|
||||||
version_added: "2.8"
|
|
||||||
apply:
|
apply:
|
||||||
description:
|
description:
|
||||||
- C(apply) compares the desired resource definition with the previously supplied resource definition,
|
- C(apply) compares the desired resource definition with the previously supplied resource definition,
|
||||||
@@ -153,7 +144,6 @@ options:
|
|||||||
- C(apply) works better with Services than 'force=yes'
|
- C(apply) works better with Services than 'force=yes'
|
||||||
- mutually exclusive with C(merge_type)
|
- mutually exclusive with C(merge_type)
|
||||||
type: bool
|
type: bool
|
||||||
version_added: "2.9"
|
|
||||||
|
|
||||||
requirements:
|
requirements:
|
||||||
- "python >= 2.7"
|
- "python >= 2.7"
|
||||||
@@ -191,11 +181,6 @@ EXAMPLES = '''
|
|||||||
name: port-8000-tcp
|
name: port-8000-tcp
|
||||||
port: 8000
|
port: 8000
|
||||||
|
|
||||||
- name: Create a Service object by reading the definition from a file
|
|
||||||
k8s:
|
|
||||||
state: present
|
|
||||||
src: /testing/service.yml
|
|
||||||
|
|
||||||
- name: Remove an existing Service object
|
- name: Remove an existing Service object
|
||||||
k8s:
|
k8s:
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ module: k8s_auth
|
|||||||
|
|
||||||
short_description: Authenticate to Kubernetes clusters which require an explicit login step
|
short_description: Authenticate to Kubernetes clusters which require an explicit login step
|
||||||
|
|
||||||
version_added: "2.8"
|
|
||||||
|
|
||||||
author: KubeVirt Team (@kubevirt)
|
author: KubeVirt Team (@kubevirt)
|
||||||
|
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -14,18 +14,24 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||||||
'supported_by': 'community'}
|
'supported_by': 'community'}
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
|
|
||||||
module: k8s_exec
|
module: k8s_exec
|
||||||
|
|
||||||
short_description: Execute command in Pod
|
short_description: Execute command in Pod
|
||||||
version_added: "1.0.0"
|
|
||||||
author: "Tristan de Cacqueray (@tristanC)"
|
author: "Tristan de Cacqueray (@tristanC)"
|
||||||
|
|
||||||
description:
|
description:
|
||||||
- Use the Kubernetes Python client to execute command on K8s pods.
|
- Use the Kubernetes Python client to execute command on K8s pods.
|
||||||
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.kubernetes.k8s_auth_options
|
- community.kubernetes.k8s_auth_options
|
||||||
|
|
||||||
requirements:
|
requirements:
|
||||||
- "python >= 2.7"
|
- "python >= 2.7"
|
||||||
- "openshift == 0.4.3"
|
- "openshift == 0.4.3"
|
||||||
- "PyYAML >= 3.11"
|
- "PyYAML >= 3.11"
|
||||||
|
|
||||||
options:
|
options:
|
||||||
proxy:
|
proxy:
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ module: k8s_info
|
|||||||
|
|
||||||
short_description: Describe Kubernetes (K8s) objects
|
short_description: Describe Kubernetes (K8s) objects
|
||||||
|
|
||||||
version_added: "2.7"
|
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- "Will Thames (@willthames)"
|
- "Will Thames (@willthames)"
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ module: k8s_log
|
|||||||
|
|
||||||
short_description: Fetch logs from Kubernetes resources
|
short_description: Fetch logs from Kubernetes resources
|
||||||
|
|
||||||
version_added: "1.0.0"
|
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- "Fabian von Feilitzsch (@fabianvf)"
|
- "Fabian von Feilitzsch (@fabianvf)"
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ module: k8s_scale
|
|||||||
|
|
||||||
short_description: Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
|
short_description: Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
|
||||||
|
|
||||||
version_added: "2.5"
|
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- "Chris Houseknecht (@chouseknecht)"
|
- "Chris Houseknecht (@chouseknecht)"
|
||||||
- "Fabian von Feilitzsch (@fabianvf)"
|
- "Fabian von Feilitzsch (@fabianvf)"
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ module: k8s_service
|
|||||||
|
|
||||||
short_description: Manage Services on Kubernetes
|
short_description: Manage Services on Kubernetes
|
||||||
|
|
||||||
version_added: "2.8"
|
|
||||||
|
|
||||||
author: KubeVirt Team (@kubevirt)
|
author: KubeVirt Team (@kubevirt)
|
||||||
|
|
||||||
description:
|
description:
|
||||||
@@ -121,7 +119,6 @@ options:
|
|||||||
- C(apply) works better with Services than 'force=yes'
|
- C(apply) works better with Services than 'force=yes'
|
||||||
- mutually exclusive with C(merge_type)
|
- mutually exclusive with C(merge_type)
|
||||||
type: bool
|
type: bool
|
||||||
version_added: "2.9"
|
|
||||||
|
|
||||||
requirements:
|
requirements:
|
||||||
- python >= 2.7
|
- python >= 2.7
|
||||||
|
|||||||
@@ -15,13 +15,15 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: test_tempfile
|
module: test_tempfile
|
||||||
version_added: "2.3"
|
|
||||||
short_description: Creates temporary files and directories
|
short_description: Creates temporary files and directories
|
||||||
|
|
||||||
description:
|
description:
|
||||||
- The C(test_tempfile) module creates temporary files and directories. C(mktemp) command takes different parameters on various systems, this module helps
|
- The C(test_tempfile) module creates temporary files and directories. C(mktemp) command takes different parameters on various systems, this module helps
|
||||||
to avoid troubles related to that. Files/directories created by module are accessible only by creator. In case you need to make them world-accessible
|
to avoid troubles related to that. Files/directories created by module are accessible only by creator. In case you need to make them world-accessible
|
||||||
you need to use M(file) module.
|
you need to use M(file) module.
|
||||||
- For Windows targets, use the M(win_tempfile) module instead.
|
- For Windows targets, use the M(win_tempfile) module instead.
|
||||||
|
|
||||||
options:
|
options:
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
@@ -44,9 +46,11 @@ options:
|
|||||||
- Suffix of file/directory name created by module.
|
- Suffix of file/directory name created by module.
|
||||||
type: str
|
type: str
|
||||||
default: ""
|
default: ""
|
||||||
|
|
||||||
seealso:
|
seealso:
|
||||||
- module: file
|
- module: file
|
||||||
- module: win_tempfile
|
- module: win_tempfile
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- Krzysztof Magosa (@krzysztof-magosa)
|
- Krzysztof Magosa (@krzysztof-magosa)
|
||||||
'''
|
'''
|
||||||
|
|||||||
Reference in New Issue
Block a user