openshift – OpenShift inventory source
Synopsis
- Fetch containers, services and routes for one or more clusters
 - Groups by cluster name, namespace, namespace_services, namespace_pods, namespace_routes, and labels
 - Uses openshift.(yml|yaml) YAML configuration file to set parameter values.
 
Requirements
The below requirements are needed on the local master node that executes this inventory.
- python >= 2.7
 - openshift >= 0.6
 - PyYAML >= 3.11
 
Parameters
| Parameter | Choices/Defaults | Configuration | Comments | 
|---|---|---|---|
|  connections   -    |    Optional list of cluster connection settings. If no connections are provided, the default ~/.kube/config and active context will be used, and objects will be returned for all namespaces the active user is authorized to access.   |  ||
|  plugin   - / required    |   
  |    token that ensures this is a source file for the 'openshift' plugin.   |  
Examples
# File must be named openshift.yaml or openshift.yml
# Authenticate with token, and return all pods and services for all namespaces
plugin: openshift
connections:
  - host: https://192.168.64.4:8443
    api_key: xxxxxxxxxxxxxxxx
    verify_ssl: false
# Use default config (~/.kube/config) file and active context, and return objects for a specific namespace
plugin: openshift
connections:
  - namespaces:
    - testing
# Use a custom config file, and a specific context.
plugin: openshift
connections:
  - kubeconfig: /path/to/config
    context: 'awx/192-168-64-4:8443/developer'
   Status
- This inventory is not guaranteed to have a backwards compatible interface. [preview]
 - This inventory is maintained by the Ansible Community. [community]
 
Authors
- Chris Houseknecht <@chouseknecht>
 
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
Hint
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
    © 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
    https://docs.ansible.com/ansible/2.8/plugins/inventory/openshift.html