Issue #49: Remaining fixes from diff on auto-migrated collection.

This commit is contained in:
Jeff Geerling
2020-03-20 15:42:13 -05:00
parent 78902af34a
commit 7aa071c98f
13 changed files with 18 additions and 40 deletions

View File

@@ -32,8 +32,6 @@ DOCUMENTATION = """
- Use the kubectl exec command to run tasks in, or put/fetch files to, pods running on the Kubernetes
container platform.
version_added: "2.5"
requirements:
- kubectl (go binary)

View File

@@ -74,7 +74,6 @@ options:
description:
- 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).
version_added: "2.9"
type: str
persist_config:
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.
- "The fix for this k8s python library is here: https://github.com/kubernetes-client/python-base/pull/169"
type: bool
version_added: "2.10"
notes:
- "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

View File

@@ -140,7 +140,7 @@ class K8sInventoryException(Exception):
class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable, K8sAnsibleMixin):
NAME = 'k8s'
NAME = 'community.kubernetes.k8s'
transport = 'kubectl'

View File

@@ -112,7 +112,7 @@ connections:
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:
from openshift.dynamic.exceptions import DynamicApiError
@@ -121,7 +121,7 @@ except ImportError:
class InventoryModule(K8sInventoryModule):
NAME = 'openshift'
NAME = 'community.kubernetes.openshift'
transport = 'oc'

View File

@@ -20,11 +20,9 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
DOCUMENTATION = '''
lookup: k8s
version_added: "2.5"
short_description: Query the K8s API
description:
@@ -130,7 +128,7 @@ DOCUMENTATION = """
- "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
additional information visit https://github.com/openshift/openshift-restclient-python"
"""
'''
EXAMPLES = """
- name: Fetch a list of namespaces

View File

@@ -19,8 +19,6 @@ module: k8s
short_description: Manage Kubernetes (K8s) objects
version_added: "2.6"
author:
- "Chris Houseknecht (@chouseknecht)"
- "Fabian von Feilitzsch (@fabianvf)"
@@ -67,7 +65,6 @@ options:
- strategic-merge
type: list
elements: str
version_added: "2.7"
wait:
description:
- 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.
default: no
type: bool
version_added: "2.8"
wait_sleep:
description:
- Number of seconds to sleep between checks.
default: 5
type: int
version_added: "2.9"
wait_timeout:
description:
- 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
type: int
version_added: "2.8"
wait_condition:
description:
- 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
description:
- 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
for a given resource to see possible choices.
type: dict
version_added: "2.8"
validate:
description:
- how (if at all) to validate the resource definition against the kubernetes schema.
@@ -135,7 +128,6 @@ options:
default: True
type: bool
type: dict
version_added: "2.8"
append_hash:
description:
- 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
the generated hash and append_hash=no)
type: bool
version_added: "2.8"
apply:
description:
- 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'
- mutually exclusive with C(merge_type)
type: bool
version_added: "2.9"
requirements:
- "python >= 2.7"
@@ -191,11 +181,6 @@ EXAMPLES = '''
name: port-8000-tcp
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
k8s:
state: absent

View File

@@ -19,8 +19,6 @@ module: k8s_auth
short_description: Authenticate to Kubernetes clusters which require an explicit login step
version_added: "2.8"
author: KubeVirt Team (@kubevirt)
description:

View File

@@ -14,18 +14,24 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'supported_by': 'community'}
DOCUMENTATION = '''
module: k8s_exec
short_description: Execute command in Pod
version_added: "1.0.0"
author: "Tristan de Cacqueray (@tristanC)"
description:
- Use the Kubernetes Python client to execute command on K8s pods.
extends_documentation_fragment:
- community.kubernetes.k8s_auth_options
requirements:
- "python >= 2.7"
- "openshift == 0.4.3"
- "PyYAML >= 3.11"
options:
proxy:
description:

View File

@@ -18,8 +18,6 @@ module: k8s_info
short_description: Describe Kubernetes (K8s) objects
version_added: "2.7"
author:
- "Will Thames (@willthames)"

View File

@@ -18,8 +18,6 @@ module: k8s_log
short_description: Fetch logs from Kubernetes resources
version_added: "1.0.0"
author:
- "Fabian von Feilitzsch (@fabianvf)"

View File

@@ -19,8 +19,6 @@ module: k8s_scale
short_description: Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
version_added: "2.5"
author:
- "Chris Houseknecht (@chouseknecht)"
- "Fabian von Feilitzsch (@fabianvf)"

View File

@@ -19,8 +19,6 @@ module: k8s_service
short_description: Manage Services on Kubernetes
version_added: "2.8"
author: KubeVirt Team (@kubevirt)
description:
@@ -121,7 +119,6 @@ options:
- C(apply) works better with Services than 'force=yes'
- mutually exclusive with C(merge_type)
type: bool
version_added: "2.9"
requirements:
- python >= 2.7

View File

@@ -15,13 +15,15 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = '''
---
module: test_tempfile
version_added: "2.3"
short_description: Creates temporary files and directories
description:
- 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
you need to use M(file) module.
- For Windows targets, use the M(win_tempfile) module instead.
options:
state:
description:
@@ -44,9 +46,11 @@ options:
- Suffix of file/directory name created by module.
type: str
default: ""
seealso:
- module: file
- module: win_tempfile
author:
- Krzysztof Magosa (@krzysztof-magosa)
'''