Skip to content

Commit 63bb6ab

Browse files
committed
Handle GCP
1 parent dde3502 commit 63bb6ab

File tree

1 file changed

+42
-18
lines changed

1 file changed

+42
-18
lines changed

reboot_measurement/reboot_measure.yml

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,48 @@
4848
# Once the list is built, we need to do a login to avoid ansible runnning into a
4949
# login prompt.
5050
#
51-
- name: assign test hosts
52-
add_host:
53-
name: "{{ test_hostname }}"
54-
groups: test_group
55-
ansible_user: "{{ config_info.test_user }}"
56-
ansible_ssh_private_key_file: "{{ config_info.ssh_key }}"
57-
loop: "{{ test_group_list }}"
58-
loop_control:
59-
loop_var: test_hostname
60-
- name: initial login to test hosts
61-
command: "ssh -oStrictHostKeyChecking=no {{ dyn_data.ssh_i_option }} {{ config_info.test_user }}@{{ test_hostname }} \"cat /etc/passwd > /dev/null\""
62-
loop: "{{ test_group_list }}"
63-
loop_control:
64-
loop_var: test_hostname
65-
- name: make the results dir.
66-
file:
67-
path: "{{ working_dir }}/reboot_boot_info"
68-
state: directory
51+
- name: assign test hosts, non gcp
52+
block:
53+
- name: add host
54+
add_host:
55+
name: "{{ test_hostname }}"
56+
groups: test_group
57+
ansible_user: "{{ config_info.test_user }}"
58+
ansible_ssh_private_key_file: "{{ config_info.ssh_key }}"
59+
loop: "{{ test_group_list }}"
60+
loop_control:
61+
loop_var: test_hostname
62+
- name: initial login to test hosts, non gcp
63+
command: "ssh -oStrictHostKeyChecking=no {{ dyn_data.ssh_i_option }} {{ config_info.test_user }}@{{ test_hostname }} \"cat /etc/passwd > /dev/null\""
64+
loop: "{{ test_group_list }}"
65+
loop_control:
66+
loop_var: test_hostname
67+
- name: make the results dir.
68+
file:
69+
path: "{{ working_dir }}/reboot_boot_info"
70+
state: directory
71+
when: config_info.system_type != "gcp"
72+
73+
- name: assign test hosts, gcp
74+
block:
75+
- name: add host
76+
add_host:
77+
name: "{{ test_hostname }}"
78+
groups: test_group
79+
ansible_user: "{{ config_info.test_user }}"
80+
loop: "{{ test_group_list }}"
81+
loop_control:
82+
loop_var: test_hostname
83+
- name: initial login to test hosts, non gcp
84+
command: "ssh -oStrictHostKeyChecking=no {{ config_info.test_user }}@{{ test_hostname }} \"cat /etc/passwd > /dev/null\""
85+
loop: "{{ test_group_list }}"
86+
loop_control:
87+
loop_var: test_hostname
88+
- name: make the results dir.
89+
file:
90+
path: "{{ working_dir }}/reboot_boot_info"
91+
state: directory
92+
when: config_info.system_type == "gcp"
6993

7094
#
7195
# Perform the reboot measurement test.

0 commit comments

Comments
 (0)