Skip to content

Commit

Permalink
pre-get_kubeconfig: Try logging in with cifw role
Browse files Browse the repository at this point in the history
  • Loading branch information
elfiesmelfie committed Dec 18, 2023
1 parent 1173f03 commit b31aa79
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions ci/pre-get_kubeconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@
- debug: var=ansible_env.ANSIBLE_ACTION_PLUGINS
when: ansible_env.ANSIBLE_ACTION_PLUGINS is defined

- name: "Log into OpenShift"
ansible.builtin.shell:
cmd: |
oc login -u {{ cifmw_openshift_user }} -p {{ cifmw_openshift_password }} --insecure-skip-tls-verify=true {{ cifmw_openshift_api }}
#- name: "Log into OpenShift"
# ansible.builtin.shell:
# cmd: |
# oc login -u {{ cifmw_openshift_user }} -p {{ cifmw_openshift_password }} --insecure-skip-tls-verify=true {{ cifmw_openshift_api }}

- name: "Link the kubeconfig file"
ansible.builtin.shell:
cmd: |
mkdir -p {{ cifmw_openshift_kubeconfig | dirname }}
ln -s {{ ansible_env.HOME }}/.kube/config {{ cifmw_openshift_kubeconfig }}
# I need to figure out why the ci_script module is not available in the environment, since the command above is taking the login command out of that.
#- name: "Login into openshift"
# ansible.builtin.include_role:
# name: "{{ zuul.projects['github.com/openstack-k8s-operators/ci-framework'].src_dir }}/ci_framework/roles/openshift_login"
# vars:
# cifmw_openshift_login_kubeconfig: "{{ cifmw_openshift_kubeconfig }}"
# cifmw_openshift_login_user: "{{ cifmw_openshift_user }}"
# cifmw_openshift_login_password: "{{ cifmw_openshift_password }}"
# # from: https://github.com/openstack-k8s-operators/ci-framework/blob/1cc9e123a74a081a4a9335f4277fe1649cb04e40/docs/source/usage/01_usage.md?plain=1#L17
# # TODO: Update this so I don't have to set it. This shouldn't be set on the controller, should it?
# cifmw_path: "~/.crc/bin:~/.crc/bin/oc:~/bin:{{ ansible_env.PATH }}"
I need to figure out why the ci_script module is not available in the environment, since the command above is taking the login command out of that.
- name: "Login into openshift"
ansible.builtin.include_role:
name: "{{ zuul.projects['github.com/openstack-k8s-operators/ci-framework'].src_dir }}/ci_framework/roles/openshift_login"
vars:
cifmw_openshift_login_kubeconfig: "{{ cifmw_openshift_kubeconfig }}"
cifmw_openshift_login_user: "{{ cifmw_openshift_user }}"
cifmw_openshift_login_password: "{{ cifmw_openshift_password }}"
# from: https://github.com/openstack-k8s-operators/ci-framework/blob/1cc9e123a74a081a4a9335f4277fe1649cb04e40/docs/source/usage/01_usage.md?plain=1#L17
# TODO: Update this so I don't have to set it. This shouldn't be set on the controller, should it?
cifmw_path: "~/.crc/bin:~/.crc/bin/oc:~/bin:{{ ansible_env.PATH }}"

0 comments on commit b31aa79

Please sign in to comment.