ansible / ansible.builtin / v2.9.27 / connection / oc Execute tasks in pods running on OpenShift. | "added in version" 2.5 of ansible.builtin" Authors: xuxinkunansible.builtin.oc (v2.9.27) — connection
pip
Install with pip install ansible==2.9.27
Use the oc exec command to run tasks in, or put/fetch files to, pods running on the OpenShift container platform.
oc_pod: default: '' description: - Pod name. Required when the host name does not match pod name. env: - name: K8S_AUTH_POD vars: - name: ansible_oc_pod ca_cert: aliases: - oc_ssl_ca_cert default: '' description: - Path to a CA certificate used to authenticate with the API. env: - name: K8S_AUTH_SSL_CA_CERT vars: - name: ansible_oc_ssl_ca_cert - name: ansible_oc_ca_cert oc_host: default: '' description: - URL for accessing the API. env: - name: K8S_AUTH_HOST - name: K8S_AUTH_SERVER vars: - name: ansible_oc_host - name: ansible_oc_server oc_token: description: - API authentication bearer token. env: - name: K8S_AUTH_TOKEN - name: K8S_AUTH_API_KEY vars: - name: ansible_oc_token - name: ansible_oc_api_key client_key: aliases: - oc_key_file default: '' description: - Path to a key file used to authenticate with the API. env: - name: K8S_AUTH_KEY_FILE vars: - name: ansible_oc_key_file - name: ansible_oc_client_key oc_context: default: '' description: - The name of a context found in the K8s config file. env: - name: k8S_AUTH_CONTEXT vars: - name: ansible_oc_context client_cert: aliases: - oc_cert_file default: '' description: - Path to a certificate used to authenticate with the API. env: - name: K8S_AUTH_CERT_FILE vars: - name: ansible_oc_cert_file - name: ansible_oc_client_cert oc_container: default: '' description: - Container name. Required when a pod contains more than one container. env: - name: K8S_AUTH_CONTAINER vars: - name: ansible_oc_container oc_namespace: default: '' description: - The namespace of the pod env: - name: K8S_AUTH_NAMESPACE vars: - name: ansible_oc_namespace oc_extra_args: default: '' description: - Extra arguments to pass to the oc command line. env: - name: K8S_AUTH_EXTRA_ARGS vars: - name: ansible_oc_extra_args oc_kubeconfig: default: '' description: - Path to a oc config file. Defaults to I(~/.kube/conig) env: - name: K8S_AUTH_KUBECONFIG vars: - name: ansible_oc_kubeconfig - name: ansible_oc_config validate_certs: aliases: - oc_verify_ssl default: '' description: - Whether or not to verify the API server's SSL certificate. Defaults to I(true). env: - name: K8S_AUTH_VERIFY_SSL vars: - name: ansible_oc_verify_ssl - name: ansible_oc_validate_certs