extract credentials added readme

This commit is contained in:
Cédric Verstraeten
2022-11-22 05:15:31 +00:00
parent e70a66f7b4
commit feaba1afb5
3 changed files with 14 additions and 4 deletions

View File

@@ -37,4 +37,9 @@ RUN curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
RUN npm install -g yarn
RUN npm install -g yarn
##########################
# Dependencies for ansible
RUN pip install requests requests-oauthlib kubernetes

View File

@@ -0,0 +1,5 @@
# Deploy to a Red Hat OpenShift cluster using ansible
Eithin this directory you'll find an Ansible playbook to install a Kerberos Agent to an existing OpenShift cluster. By providing the cluster url, username and password, you will be able to create several resources in your cluster.
ansible-playbook -e '{"oc_cluster_url":"https://api.j5z0adui.westeurope.aroapp.io:6443", "oc_username":"kubeadmin", "oc_password":"xxx"}' playbook.yml

View File

@@ -6,13 +6,13 @@
tasks:
- name: Print Variables
debug:
msg: "OC url: {{ oc_cluster_url }}"
msg: "OpenShift url: {{ oc_cluster_url }}, OpenShift username: {{ oc_username }}, OpenShift password: {{ oc_password }}"
- name: Try to login to OCP cluster
k8s_auth:
host: "{{ oc_cluster_url }}"
username: kubeadmin
password: wD6Wg-ovgDz-32gYB-o9nkj
username: "{{ oc_username }}"
password: "{{ oc_password }}"
validate_certs: no
register: k8s_auth_result