mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
New k8s_facts module
Strip out the facts parts of the k8s module into a new simpler module that deals with querying for facts, also allowing field and label selectors
This commit is contained in:
parent
ffba0a5d99
commit
895c512596
3 changed files with 183 additions and 15 deletions
|
@ -30,6 +30,7 @@ description:
|
|||
- 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.
|
||||
- Use the M(k8s_facts) module to obtain a list of items about an object of type C(kind)
|
||||
- Authenticate using either a config file, certificates, password or token.
|
||||
- Supports check mode.
|
||||
|
||||
|
@ -80,21 +81,6 @@ EXAMPLES = '''
|
|||
state: present
|
||||
src: /testing/service.yml
|
||||
|
||||
- name: Get an existing Service object
|
||||
k8s:
|
||||
api_version: v1
|
||||
kind: Service
|
||||
name: web
|
||||
namespace: testing
|
||||
register: web_service
|
||||
|
||||
- name: Get a list of all service objects
|
||||
k8s:
|
||||
api_version: v1
|
||||
kind: ServiceList
|
||||
namespace: testing
|
||||
register: service_list
|
||||
|
||||
- name: Remove an existing Service object
|
||||
k8s:
|
||||
state: absent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue