To provide reusable automation to run ansible plays and roles against OpenShift 4 clusters
Note
|
This will always pull the latest stable OpenShift 4 CLI tools |
-
Add any addition modules to requirements.txt with
openshift
listed
-
Create repository secret in GitHub Settings > Secrets called KUBECONFIG that contains kubeconfig details
-
Update ansible playbook called main.yaml to ensure vars are set
-
ansible_python_interpreter: /usr/bin/python3
-
OPERATOR-NAME: web-terminal
put operator to install here -
NAMESPACE: openshift-operators
put namespace to install operator at here
-
-
Create repository secret in
GitHub Settings > Secrets
calledKUBECONFIG
that contains kubeconfig details for the OCP4 cluster. -
Update ansible playbook called
main.yaml
`to ensure the operators that you wanted installed are in the `role
, formated as:-
{name: OPERATOR_NAME, namespace: OPERATOR_NAMESPACE}
-
{name: openshift-gitops-operator, namespace: openshift-operators}
`
-
Once the main branch is pushed with updates to main.yaml the workflow will trigger the actions that will run ansible-playbook.
This is intended to simulate running Ansible playbooks to engineer, operate, or manage OpenShift 4 clusters on a bastion host. The playbook is intended to run locally on runner and use either oc
, kubectl
, or other modules that interact with OpenShift APIs or any APIs.