aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-03-17 18:15:30 +0000
committerPeter Mikus <pmikus@cisco.com>2019-03-17 18:15:30 +0000
commit6ed351a58a7452d6bd99a049cc45610345b7c75b (patch)
tree2325cf6af2de0bede9baa1bced0a4c31d02740ba /resources/tools
parent648b88dded49db91bbdecf93fbc684e8c696752d (diff)
Prepare image for KernelVM on machines.
TASK [sut : Get kernel-kvm version] *************************************** changed: [10.30.51.52] TASK [sut : Download kernel-kvm] ****************************************** changed: [10.30.51.52] TASK [sut : Unpack kernel-kvm] ******************************************** changed: [10.30.51.52] PLAY RECAP **************************************************************** 10.30.51.52 : ok=4 changed=3 unreachable=0 failed=0 Change-Id: I452f35e12c94fc58374679de21e87e36b145f987 Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/tools')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml19
-rw-r--r--resources/tools/testbed-setup/ansible/sut.yaml4
2 files changed, 21 insertions, 2 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml
index 90990b6c3b..53f1f9b6c2 100644
--- a/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml
@@ -15,3 +15,22 @@
state: 'link'
become: yes
tags: copy-80-vpp
+
+- name: Get kernel-kvm version
+ shell: "apt-cache depends -i linux-image-kvm | grep Depends: | cut -d' ' -f4"
+ register: 'linux__image_kvm_read'
+ tags: install-kernelvm
+
+- name: Download kernel-kvm
+ shell: "apt-get -y download {{ linux__image_kvm_read.stdout }}"
+ args:
+ warn: false # Prevent warning as APT module does not support download.
+ register: 'linux__image_kvm_download'
+ when: 'linux__image_kvm_read'
+ tags: install-kernelvm
+
+- name: Unpack kernel-kvm
+ shell: "dpkg --extract {{ linux__image_kvm_read.stdout }}_*.deb /opt/"
+ when: 'linux__image_kvm_download'
+ tags: install-kernelvm
+
diff --git a/resources/tools/testbed-setup/ansible/sut.yaml b/resources/tools/testbed-setup/ansible/sut.yaml
index 9b7a66656d..a8dbb38331 100644
--- a/resources/tools/testbed-setup/ansible/sut.yaml
+++ b/resources/tools/testbed-setup/ansible/sut.yaml
@@ -8,8 +8,8 @@
roles:
- role: common
tags: common
- - role: tg
- tags: tg
+ - role: sut
+ tags: sut
- role: tg_sut
tags: tg_sut
- role: calibration