diff --git a/molecule/default/tasks/openshift_auth.yml b/molecule/default/tasks/openshift_auth.yml index 9c30c78..be0d2c9 100644 --- a/molecule/default/tasks/openshift_auth.yml +++ b/molecule/default/tasks/openshift_auth.yml @@ -1,8 +1,13 @@ --- -- vars: - # TODO(fabianvf) Get this parameter working locally as well - openshift_host: 'https://kubernetes.default.svc' - block: +- block: + - name: Retrieve cluster info + kubernetes.core.k8s_cluster_info: + register: k8s_cluster + + - name: set openshift host value + set_fact: + openshift_host: "{{ k8s_cluster.connection.host }}" + - name: Log in (obtain access token) community.okd.openshift_auth: username: test