Skip to content

Commit

Permalink
Handle GCP
Browse files Browse the repository at this point in the history
  • Loading branch information
dvalinrh committed Jul 14, 2022
1 parent dde3502 commit 63bb6ab
Showing 1 changed file with 42 additions and 18 deletions.
60 changes: 42 additions & 18 deletions reboot_measurement/reboot_measure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,48 @@
# Once the list is built, we need to do a login to avoid ansible runnning into a
# login prompt.
#
- name: assign test hosts
add_host:
name: "{{ test_hostname }}"
groups: test_group
ansible_user: "{{ config_info.test_user }}"
ansible_ssh_private_key_file: "{{ config_info.ssh_key }}"
loop: "{{ test_group_list }}"
loop_control:
loop_var: test_hostname
- name: initial login to test hosts
command: "ssh -oStrictHostKeyChecking=no {{ dyn_data.ssh_i_option }} {{ config_info.test_user }}@{{ test_hostname }} \"cat /etc/passwd > /dev/null\""
loop: "{{ test_group_list }}"
loop_control:
loop_var: test_hostname
- name: make the results dir.
file:
path: "{{ working_dir }}/reboot_boot_info"
state: directory
- name: assign test hosts, non gcp
block:
- name: add host
add_host:
name: "{{ test_hostname }}"
groups: test_group
ansible_user: "{{ config_info.test_user }}"
ansible_ssh_private_key_file: "{{ config_info.ssh_key }}"
loop: "{{ test_group_list }}"
loop_control:
loop_var: test_hostname
- name: initial login to test hosts, non gcp
command: "ssh -oStrictHostKeyChecking=no {{ dyn_data.ssh_i_option }} {{ config_info.test_user }}@{{ test_hostname }} \"cat /etc/passwd > /dev/null\""
loop: "{{ test_group_list }}"
loop_control:
loop_var: test_hostname
- name: make the results dir.
file:
path: "{{ working_dir }}/reboot_boot_info"
state: directory
when: config_info.system_type != "gcp"

- name: assign test hosts, gcp
block:
- name: add host
add_host:
name: "{{ test_hostname }}"
groups: test_group
ansible_user: "{{ config_info.test_user }}"
loop: "{{ test_group_list }}"
loop_control:
loop_var: test_hostname
- name: initial login to test hosts, non gcp
command: "ssh -oStrictHostKeyChecking=no {{ config_info.test_user }}@{{ test_hostname }} \"cat /etc/passwd > /dev/null\""
loop: "{{ test_group_list }}"
loop_control:
loop_var: test_hostname
- name: make the results dir.
file:
path: "{{ working_dir }}/reboot_boot_info"
state: directory
when: config_info.system_type == "gcp"

#
# Perform the reboot measurement test.
Expand Down

0 comments on commit 63bb6ab

Please sign in to comment.