Improving docs and examples (#34155)

* Improving docs and examples

* Removes trailing whitespace
This commit is contained in:
Chris Houseknecht 2017-12-22 17:12:17 -05:00 committed by GitHub
commit 1c391e777a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 69 additions and 31 deletions

View file

@ -24,16 +24,20 @@ version_added: "2.5"
author: "Chris Houseknecht (@chouseknecht)"
description:
- Use the OpenShift Python client to perform CRUD operations on Kubernetes objects.
- Supports authentication using either a config file, certificates, password or token.
- Use the OpenShift Python client to perform CRUD operations on K8s objects.
- Pass the object definition from a source file or inline. See examples for reading
files and using Jinja templates.
- Access to the full range of K8s APIs.
- Authenticate using either a config file, certificates, password or token.
- Supports check mode, and the diff option.
extends_documentation_fragment:
- kubernetes
requirements:
- "python >= 2.7"
- "openshift >= 0.3"
- "PyYAML >= 3.11"
- "python >= 2.7"
- "openshift >= 0.3"
- "PyYAML >= 3.11"
'''
EXAMPLES = '''
@ -93,6 +97,23 @@ EXAMPLES = '''
kind: Service
namespace: testing
name: web
# Passing the object definition from a file
- name: Create a Deployment by reading the definition from a local file
k8s_raw:
state: present
src: /testing/deployment.yml
- name: Read definition file from the Ansible controller file system
k8s_raw:
state: present
definition: "{{ lookup('file', '/testing/deployment.yml') | from_yaml }}"
- name: Read definition file from the Ansible controller file system after Jinja templating
k8s_raw:
state: present
definition: "{{ lookup('template', '/testing/deployment.yml') | from_yaml }}"
'''
RETURN = '''