diff --git a/roles/prepare-crc-cloud/tasks/pre.yaml b/roles/prepare-crc-cloud/tasks/pre.yaml index e8cd8b22f0..fa925ea526 100644 --- a/roles/prepare-crc-cloud/tasks/pre.yaml +++ b/roles/prepare-crc-cloud/tasks/pre.yaml @@ -93,6 +93,12 @@ dest: ~core/id_rsa.pub remote_src: true +- name: Copy generated pub key to authorized keys + ansible.builtin.copy: + src: ~core/.ssh/id_rsa.pub + dest: ~core/.ssh/authorized_keys.d/generated + remote_src: true + - name: Inject pull secret into /var/lib/kubelet/config.json become: true ansible.builtin.copy: diff --git a/roles/prepare-crc-cloud/tasks/start.yaml b/roles/prepare-crc-cloud/tasks/start.yaml index 308050f1b1..380660c335 100644 --- a/roles/prepare-crc-cloud/tasks/start.yaml +++ b/roles/prepare-crc-cloud/tasks/start.yaml @@ -5,9 +5,11 @@ #!/bin/bash # Waiting for merge: https://github.com/crc-org/crc-cloud/pull/189 - export LOG_PATH="~core/workdir/" + export LOG_PATH="$(realpath ~core/workdir)" export LOG_FILE="$LOG_PATH/clustersetup-log" + export KUBECONFIG=/opt/kubeconfig + export PULL_SECRET="{{ crc_secret_pabrodri.openshift_pull_secret | b64encode }}" export PASS_DEVELOPER="{{ developer_pass }}" export PASS_KUBEADMIN="{{ kubeadmin_pass }}" @@ -15,10 +17,6 @@ export IIP="{{ ansible_default_ipv4.address }}" export EIP="{{ crc_hostname }}" - # Workaround for openshift-marketplace and openshift-console container pull error - # https://github.com/danpawlik/crc-cloud/commits/global-pull-secret/ - export GLOBAL_SECURED_REGISTRIES=true - sudo -E bash ~core/workdir/crc-cloud/pkg/bundle/setup/clustersetup.sh > ~core/workdir/crc-cloud-log 2> ~core/workdir/crc-cloud-error-log dest: ~core/workdir/start-crc-cloud.sh mode: "0755"