aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles/iperf
diff options
context:
space:
mode:
authorvagrant <pmikus@cisco.com>2020-02-04 14:16:01 +0000
committerPeter Mikus <pmikus@cisco.com>2020-02-07 20:08:43 +0000
commit8605f3f406468f57bb9b2eac12a4421f65965300 (patch)
tree5eef32ff0298ab1c3ac593adced4a502d7c8ea17 /resources/tools/testbed-setup/ansible/roles/iperf
parentd7e14a0a93e7e06047daeaf6a5575f227aeb925a (diff)
CSIT Azure integration
+ Terraform + Ansible Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I353511c5ef39d8c8d43fedc61c8dbb30b4821e1b
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/iperf')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml21
-rw-r--r--resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml40
2 files changed, 61 insertions, 0 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml
new file mode 100644
index 0000000000..9639c93a4d
--- /dev/null
+++ b/resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml
@@ -0,0 +1,21 @@
+---
+# file: roles/iperf/defaults/main.yaml
+
+packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+
+packages_base:
+ - []
+
+packages_by_distro:
+ ubuntu:
+ - "build-essential"
+ - "lib32z1"
+
+packages_by_arch:
+ aarch64:
+ - []
+ x86_64:
+ - []
+
+iperf_target_dir: "/opt"
+iperf_version: "3.7"
diff --git a/resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml
new file mode 100644
index 0000000000..e43206bf8d
--- /dev/null
+++ b/resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml
@@ -0,0 +1,40 @@
+---
+# file: roles/iperf/tasks/main.yaml
+
+- name: iPerf Install - Install Distribution - Release - Machine Prerequisites
+ package:
+ name: "{{ packages | flatten(levels=1) }}"
+ state: latest
+ update_cache: true
+ tags:
+ - install-dependencies
+
+- name: iPerf Install - Get Release Archive
+ get_url:
+ url: "https://downloads.es.net/pub/iperf/iperf-{{ iperf_version }}.tar.gz"
+ dest: "{{ iperf_target_dir }}/iperf-{{ iperf_version }}.tar.gz"
+ mode: 0644
+ tags:
+ - install-iperf
+
+- name: iPerf Install - Ensure Directory Exists
+ file:
+ path: "{{ iperf_target_dir }}/iperf-{{ iperf_version }}"
+ state: "directory"
+ tags:
+ - install-iperf
+
+- name: iPerf Install - Extract Release Archive
+ unarchive:
+ remote_src: true
+ src: "{{ iperf_target_dir }}/iperf-{{ iperf_version }}.tar.gz"
+ dest: "{{ iperf_target_dir }}/"
+ creates: "{{ iperf_target_dir }}/iperf-{{ iperf_version }}/"
+ tags:
+ - install-iperf
+
+- name: iPerf Install - Compile Release I
+ shell: |
+ cd "{{ iperf_target_dir }}/iperf-{{ iperf_version }}/" && ./configure && make && make install
+ tags:
+ - install-iperf