mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
Improving docs and examples (#34155)
* Improving docs and examples * Removes trailing whitespace
This commit is contained in:
parent
d19108e592
commit
1c391e777a
4 changed files with 69 additions and 31 deletions
|
@ -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 = '''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue