summaryrefslogtreecommitdiff
path: root/roles/install-open-vmdk
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2020-04-20 23:45:01 +0300
committerzsdc <taras@vyos.io>2020-04-20 23:45:01 +0300
commitafca529c30e486e834ad5e98f18bfba5f40710ac (patch)
treedb0aa82c17f585af7e9238153acf8c67507f3fcd /roles/install-open-vmdk
parentffd398585f441f6cc3b23e9080f48ed7fe951069 (diff)
downloadvyos-vm-images-afca529c30e486e834ad5e98f18bfba5f40710ac.tar.gz
vyos-vm-images-afca529c30e486e834ad5e98f18bfba5f40710ac.zip
Restored ability to build an OVA image
Also: - actualized some variables - added more objects to cleanup to not keep garbage after playbook run - added variable to select default boot console in GRUB
Diffstat (limited to 'roles/install-open-vmdk')
-rw-r--r--roles/install-open-vmdk/tasks/main.yml17
1 files changed, 15 insertions, 2 deletions
diff --git a/roles/install-open-vmdk/tasks/main.yml b/roles/install-open-vmdk/tasks/main.yml
index dedece0..8d19da4 100644
--- a/roles/install-open-vmdk/tasks/main.yml
+++ b/roles/install-open-vmdk/tasks/main.yml
@@ -7,14 +7,27 @@
url: https://github.com/vmware/open-vmdk/archive/master.zip
dest: /tmp/master.zip
when: stat_result.stat.exists == False
-- name: Extract master.zip into /var/lib/foo
+- name: Extract master.zip into /tmp
unarchive:
src: /tmp/master.zip
dest: /tmp
when: stat_result.stat.exists == False
+- name: Build open-vmdk
+ become: true
+ make:
+ chdir: /tmp/open-vmdk-master/vmdk
+ when: stat_result.stat.exists == False
- name: Install open-vmdk
become: true
make:
- chdir: /tmp/open-vmdk-master
+ chdir: /tmp/open-vmdk-master/vmdk
target: install
when: stat_result.stat.exists == False
+- name: Delete installation directory and archive
+ file:
+ path: "{{ item }}"
+ state: absent
+ loop:
+ - "/tmp/open-vmdk-master"
+ - "/tmp/master.zip"
+ when: stat_result.stat.exists == False