aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles/download_trex
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/download_trex')
-rw-r--r--ansible/roles/download_trex/defaults/main.yml6
-rw-r--r--ansible/roles/download_trex/tasks/main.yml12
2 files changed, 13 insertions, 5 deletions
diff --git a/ansible/roles/download_trex/defaults/main.yml b/ansible/roles/download_trex/defaults/main.yml
index dd2dd27eb..6e8fa7020 100644
--- a/ansible/roles/download_trex/defaults/main.yml
+++ b/ansible/roles/download_trex/defaults/main.yml
@@ -12,9 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
-trex_version: v2.20
+trex_version: v2.28
trex_url: "https://trex-tgn.cisco.com/trex/release/{{ trex_version }}.tar.gz"
trex_file: "{{ trex_url|basename }}"
trex_unarchive: "{{ trex_file|regex_replace('[.]tar.gz$', '') }}"
trex_dest: "{{ clone_dest }}/"
-trex_sha256: "sha256:eb5a069f758a36133a185c7e27af10834ca03d11441165403529fbd7844658fb"
+trex_sha256s:
+ "v2.20": "sha256:eb5a069f758a36133a185c7e27af10834ca03d11441165403529fbd7844658fb"
+ "v2.28": "sha256:c3f08aabbd69dddb09843984d41acbe9ba1af6a6ef3380a7830f7c9e33134207"
diff --git a/ansible/roles/download_trex/tasks/main.yml b/ansible/roles/download_trex/tasks/main.yml
index 75a3169f0..baa964fd8 100644
--- a/ansible/roles/download_trex/tasks/main.yml
+++ b/ansible/roles/download_trex/tasks/main.yml
@@ -16,10 +16,16 @@
get_url:
url: "{{ trex_url }}"
dest: "{{ trex_dest }}"
- checksum: "{{ trex_sha256 }}"
+ validate_certs: False
+ checksum: "{{ trex_sha256s[trex_version] }}"
- name: unarchive Trex
unarchive:
- src: "{{ clone_dest }}/{{ trex_file }}"
- dest: "{{ clone_dest }}/"
+ src: "{{ trex_dest }}/{{ trex_file }}"
+ dest: "{{ trex_dest }}/"
copy: no
+
+- name: cleanup tar file to save space
+ file:
+ path: "{{ trex_dest }}/{{ trex_file }}"
+ state: absent