Skip to content

Commit cc5e819

Browse files
committed
Update tobiko task for running in adoption unijobs
1 parent 9850f4f commit cc5e819

File tree

1 file changed

+10
-4
lines changed
  • tests/roles/development_environment/tasks

1 file changed

+10
-4
lines changed

tests/roles/development_environment/tasks/main.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,26 +102,28 @@
102102
when: tobiko_qe_test | default('false') | bool
103103
environment:
104104
OS_CLOUD_IP: "{{ standalone_ip | default(edpm_node_ip) }}"
105+
EDPM_PRIVATEKEY_PATH: "{{ edpm_privatekey_path }}"
105106
block:
106107
# Temporal - tobiko installation task
107108
- name: tobiko installation
108109
ansible.builtin.shell: >
109-
ssh ${OS_CLOUD_IP} "set -o pipefail && mkdir -p ~/src/x && cd ~/src/x &&
110+
ssh -i ${EDPM_PRIVATEKEY_PATH} -o StrictHostKeyChecking=no ${OS_CLOUD_IP} "set -o pipefail && mkdir -p ~/src/x && cd ~/src/x &&
110111
git clone https://github.com/redhat-openstack/tobiko.git &&
111112
cd tobiko && git checkout {{ tobiko_version }}"
112113
113114
- name: oc undercloud installation
114115
ansible.builtin.shell: >
115-
ssh ${OS_CLOUD_IP} "curl -s -L https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz
116+
ssh -i ${EDPM_PRIVATEKEY_PATH} -o StrictHostKeyChecking=no ${OS_CLOUD_IP} "curl -s -L https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz
116117
| sudo tar -zxvf - -C /usr/local/bin/"
117118
118119
- name: copy kube conf to undercloud
119120
ansible.builtin.shell: |
120-
scp -r ~/.kube/ ${OS_CLOUD_IP}:~
121+
scp -i ${EDPM_PRIVATEKEY_PATH} -o StrictHostKeyChecking=no -r ~/.kube/ ${OS_CLOUD_IP}:~
121122
122123
- name: upload tobiko-playbook.yaml to the undercloud
123124
delegate_to: "{{ standalone_ip | default(edpm_node_ip) }}"
124125
vars:
126+
ansible_ssh_private_key_file: "{{ edpm_privatekey_path }}"
125127
tobiko_playbook: |
126128
- name: Playbook to run tobiko from the undercloud pre-adoption
127129
hosts: localhost
@@ -135,13 +137,17 @@
135137
dest: ~/src/x/tobiko/tobiko-playbook.yaml
136138

137139
- name: Add tobiko.conf to the undercloud
140+
vars:
141+
ansible_ssh_private_key_file: "{{ edpm_privatekey_path }}"
138142
delegate_to: "{{ standalone_ip | default(edpm_node_ip) }}"
139143
ansible.builtin.copy:
140144
mode: a+r
141145
content: "{{ tobiko_conf_file }}"
142146
dest: ~/src/x/tobiko/tobiko.conf
143147

144148
- name: Run Tobiko from the undercloud
149+
vars:
150+
ansible_ssh_private_key_file: "{{ edpm_privatekey_path }}"
145151
delegate_to: "{{ standalone_ip | default(edpm_node_ip) }}"
146152
ansible.builtin.shell:
147153
chdir: ~/src/x/tobiko/
@@ -154,4 +160,4 @@
154160
155161
- name: copy keys from undercloud for tobiko
156162
ansible.builtin.shell: |
157-
mkdir -p ~/ci-framework-data/tests/test_operator; scp -r ${OS_CLOUD_IP}:~/.ssh/id_ecdsa* ~/ci-framework-data/tests/test_operator/
163+
mkdir -p ~/ci-framework-data/tests/test_operator; scp -i ${EDPM_PRIVATEKEY_PATH} -o StrictHostKeyChecking=no -r ${OS_CLOUD_IP}:~/.ssh/id_ecdsa* ~/ci-framework-data/tests/test_operator/

0 commit comments

Comments
 (0)