From 63deaeecf0106768fe742bdcd1e50a88eeb1faea Mon Sep 17 00:00:00 2001 From: abikouo <79859644+abikouo@users.noreply.github.com> Date: Wed, 26 May 2021 16:42:41 +0200 Subject: [PATCH] remove hardcoded host value for molecule test openshift_auth (#90) --- molecule/default/tasks/openshift_auth.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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