Prepare image for KernelVM on machines. 51/18351/1
authorPeter Mikus <pmikus@cisco.com>
Sun, 17 Mar 2019 18:15:30 +0000 (18:15 +0000)
committerPeter Mikus <pmikus@cisco.com>
Sun, 17 Mar 2019 18:15:30 +0000 (18:15 +0000)
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>
resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml
resources/tools/testbed-setup/ansible/sut.yaml

index 90990b6..53f1f9b 100644 (file)
     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
+
index 9b7a666..a8dbb38 100644 (file)
@@ -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

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.