Skip to content

Commit

Permalink
Use synchronize instead of ansible fetch (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanemerson authored Aug 24, 2023
1 parent 96d1130 commit 90f6dca
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions ansible/roles/benchmark/tasks/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,16 @@
- template:
src: gatling.j2.rc
dest: "{{ kcb_home }}/bin/gatling.rc"

- name: Create gatling folder
delegate_to: localhost
file: path="{{ local_results_dir }}/gatling" state=directory

- name: Get Gatling return code
fetch:
synchronize:
src: "{{ kcb_home }}/bin/gatling.rc"
dest: "{{ local_results_dir }}/gatling/{{ inventory_hostname }}.rc"
flat: yes
mode: pull

- name: Fetch the latest Gatling results
block:
Expand All @@ -80,17 +85,20 @@
set_fact:
latest_results: "{{ results.files | sort(attribute='mtime') | last }}"
- debug: var=latest_results.path
- name: Fetch Gatling results
fetch:
- name: Create simulation folder
delegate_to: localhost
file: path="{{ local_results_dir }}/simulation" state=directory
- name: Fetch Simulation results
synchronize:
src: "{{ latest_results.path }}/simulation.log"
dest: "{{ local_results_dir }}/simulation/{{ inventory_hostname }}.log"
flat: yes
mode: pull

- name: Fetch the Gatling logs
fetch:
synchronize:
src: "{{ kcb_home }}/bin/gatling.log"
dest: "{{ local_results_dir }}/gatling/{{ inventory_hostname }}.log"
flat: yes
mode: pull

- name: Create the aggregate report locally
delegate_to: localhost
Expand Down

0 comments on commit 90f6dca

Please sign in to comment.