Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Remaining fixes from diff on auto-migrated collection. #59

Merged
merged 1 commit into from
Mar 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions plugins/connection/kubectl.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
- 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)

Expand Down
2 changes: 0 additions & 2 deletions plugins/doc_fragments/k8s_auth_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ class ModuleDocFragment(object):
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:
Expand All @@ -88,7 +87,6 @@ class ModuleDocFragment(object):
- 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
Expand Down
2 changes: 1 addition & 1 deletion plugins/inventory/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class K8sInventoryException(Exception):


class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable, K8sAnsibleMixin):
NAME = 'k8s'
NAME = 'community.kubernetes.k8s'

transport = 'kubectl'

Expand Down
4 changes: 2 additions & 2 deletions plugins/inventory/openshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
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
Expand All @@ -121,7 +121,7 @@


class InventoryModule(K8sInventoryModule):
NAME = 'openshift'
NAME = 'community.kubernetes.openshift'

transport = 'oc'

Expand Down
6 changes: 2 additions & 4 deletions plugins/lookup/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@

__metaclass__ = type

DOCUMENTATION = """
DOCUMENTATION = '''
lookup: k8s

version_added: "2.5"

short_description: Query the K8s API

description:
Expand Down Expand Up @@ -130,7 +128,7 @@
- "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
Expand Down
17 changes: 1 addition & 16 deletions plugins/modules/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

short_description: Manage Kubernetes (K8s) objects

version_added: "2.6"

author:
- "Chris Houseknecht (@chouseknecht)"
- "Fabian von Feilitzsch (@fabianvf)"
Expand Down Expand Up @@ -67,7 +65,6 @@
- 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
Expand All @@ -76,19 +73,16 @@
- 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.
Expand All @@ -114,11 +108,10 @@
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.
Expand All @@ -135,7 +128,6 @@
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
Expand All @@ -145,15 +137,13 @@
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,
ignoring properties that are automatically generated
- 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"
Expand Down Expand Up @@ -191,11 +181,6 @@
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
Expand Down
2 changes: 0 additions & 2 deletions plugins/modules/k8s_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

short_description: Authenticate to Kubernetes clusters which require an explicit login step

version_added: "2.8"

author: KubeVirt Team (@kubevirt)

description:
Expand Down
8 changes: 7 additions & 1 deletion plugins/modules/k8s_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,24 @@
'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:
Expand Down
2 changes: 0 additions & 2 deletions plugins/modules/k8s_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

short_description: Describe Kubernetes (K8s) objects

version_added: "2.7"

author:
- "Will Thames (@willthames)"

Expand Down
2 changes: 0 additions & 2 deletions plugins/modules/k8s_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

short_description: Fetch logs from Kubernetes resources

version_added: "1.0.0"

author:
- "Fabian von Feilitzsch (@fabianvf)"

Expand Down
2 changes: 0 additions & 2 deletions plugins/modules/k8s_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

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)"
Expand Down
3 changes: 0 additions & 3 deletions plugins/modules/k8s_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

short_description: Manage Services on Kubernetes

version_added: "2.8"

author: KubeVirt Team (@kubevirt)

description:
Expand Down Expand Up @@ -121,7 +119,6 @@
- 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
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:
Expand All @@ -44,9 +46,11 @@
- Suffix of file/directory name created by module.
type: str
default: ""

seealso:
- module: file
- module: win_tempfile

author:
- Krzysztof Magosa (@krzysztof-magosa)
'''
Expand Down