aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles
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/testbed-setup/ansible/roles
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/testbed-setup/ansible/roles')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml19
1 files changed, 19 insertions, 0 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
+