community.okd.oc connection – Execute tasks in pods running on OpenShift.
Note
This connection plugin is part of the community.okd collection (version 4.0.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.okd
.
You need further requirements to be able to use this connection plugin,
see Requirements for details.
To use it in a playbook, specify: community.okd.oc
.
Synopsis
Use the oc exec command to run tasks in, or put/fetch files to, pods running on the OpenShift container platform.
Requirements
The below requirements are needed on the local controller node that executes this connection.
oc (go binary)
Parameters
Parameter |
Comments |
---|---|
Path to a CA certificate used to authenticate with the API. Default: Configuration:
|
|
Path to a certificate used to authenticate with the API. Default: Configuration:
|
|
Path to a key file used to authenticate with the API. Default: Configuration:
|
|
Container name. Required when a pod contains more than one container. Default: Configuration:
|
|
The name of a context found in the K8s config file. Default: Configuration:
|
|
Extra arguments to pass to the oc command line. Default: Configuration:
|
|
URL for accessing the API. Default: Configuration:
|
|
Path to a oc config file. Defaults to ~/.kube/config Default: Configuration:
|
|
Local environment variable to be passed locally to the oc command line. Please be aware that this passes information directly on the command line and it could expose sensitive data. Default: Configuration:
|
|
The namespace of the pod Default: Configuration:
|
|
Pod name. Required when the host name does not match pod name. Default: Configuration:
|
|
API authentication bearer token. Configuration:
|
|
Whether or not to verify the API server’s SSL certificate. Defaults to true. Default: Configuration:
|