Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/clustering/k8s/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/clustering/k8s/_k8s_facts.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZmZddl
Z
d
efd��YZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
module: k8s_info

short_description: Describe Kubernetes (K8s) objects

version_added: "2.7"

author:
    - "Will Thames (@willthames)"

description:
  - Use the OpenShift Python client to perform read operations on K8s objects.
  - Access to the full range of K8s APIs.
  - Authenticate using either a config file, certificates, password or token.
  - Supports check mode.
  - This module was called C(k8s_facts) before Ansible 2.9. The usage did not change.

options:
  api_version:
    description:
    - Use to specify the API version. in conjunction with I(kind), I(name), and I(namespace) to identify a
      specific object.
    default: v1
    aliases:
    - api
    - version
  kind:
    description:
    - Use to specify an object model. Use in conjunction with I(api_version), I(name), and I(namespace) to identify a
      specific object.
    required: yes
  name:
    description:
    - Use to specify an object name.  Use in conjunction with I(api_version), I(kind) and I(namespace) to identify a
      specific object.
  namespace:
    description:
    - Use to specify an object namespace. Use in conjunction with I(api_version), I(kind), and I(name)
      to identify a specific object.
  label_selectors:
    description: List of label selectors to use to filter results
  field_selectors:
    description: List of field selectors to use to filter results

extends_documentation_fragment:
  - k8s_auth_options

requirements:
  - "python >= 2.7"
  - "openshift >= 0.6"
  - "PyYAML >= 3.11"
s�
- name: Get an existing Service object
  k8s_info:
    api_version: v1
    kind: Service
    name: web
    namespace: testing
  register: web_service

- name: Get a list of all service objects
  k8s_info:
    api_version: v1
    kind: Service
    namespace: testing
  register: service_list

- name: Get a list of all pods from any namespace
  k8s_info:
    kind: Pod
  register: pod_list

- name: Search for all Pods labelled app=web
  k8s_info:
    kind: Pod
    label_selectors:
      - app = web
      - tier in (dev, test)

- name: Search for all running pods
  k8s_info:
    kind: Pod
    field_selectors:
      - status.phase=Running
s
resources:
  description:
  - The object(s) that exists
  returned: success
  type: complex
  contains:
    api_version:
      description: The versioned schema of this representation of an object.
      returned: success
      type: str
    kind:
      description: Represents the REST resource this object represents.
      returned: success
      type: str
    metadata:
      description: Standard object metadata. Includes name, namespace, annotations, labels, etc.
      returned: success
      type: dict
    spec:
      description: Specific attributes of the object. Will vary based on the I(api_version) and I(kind).
      returned: success
      type: dict
    status:
      description: Current status details for the object.
      returned: success
      type: dict
(tKubernetesAnsibleModulet
AUTH_ARG_SPECNtKubernetesInfoModulecB`s)eZd�Zd�Zed��ZRS(cO`sBtj|dt||�|jdkr>|jddd�ndS(Ntsupports_check_modet	k8s_factss5The 'k8s_facts' module has been renamed to 'k8s_info'tversions2.13(Rt__init__tTruet_namet	deprecate(tselftargstkwargs((sM/usr/lib/python2.7/site-packages/ansible/modules/clustering/k8s/_k8s_facts.pyR�s
cC`sh|j�|_|jdt|j|jd|jd|jd|jd|jd|jd��dS(Ntchangedtkindtapi_versiontnamet	namespacetlabel_selectorstfield_selectors(tget_api_clienttclientt	exit_jsontFalsetkubernetes_factstparams(R((sM/usr/lib/python2.7/site-packages/ansible/modules/clustering/k8s/_k8s_facts.pytexecute_module�s



cC`s�tjt�}|jtdtdt�dtdddddg�d	t�d
t�dtdd
dg�dtdd
dg���|S(NRtrequiredRtdefaulttv1taliasestapiR
RRRttypetlistR(tcopytdeepcopyR	tupdatetdictR(RR((sM/usr/lib/python2.7/site-packages/ansible/modules/clustering/k8s/_k8s_facts.pytargspec�s		(t__name__t
__module__RR"tpropertyR.(((sM/usr/lib/python2.7/site-packages/ansible/modules/clustering/k8s/_k8s_facts.pyR
�s		cC`st�j�dS(N(R
R"(((sM/usr/lib/python2.7/site-packages/ansible/modules/clustering/k8s/_k8s_facts.pytmain�st__main__(t
__future__RRRR(t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.k8s.commonRR	R*R
R2R/(((sM/usr/lib/python2.7/site-packages/ansible/modules/clustering/k8s/_k8s_facts.pyt<module>s


5#$	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]