summaryrefslogtreecommitdiff
path: root/roles/vmware/tasks/setup_iso.yml
diff options
context:
space:
mode:
authorYuya Kusakabe <yuya.kusakabe@gmail.com>2018-06-21 17:12:20 +0900
committerYuya Kusakabe <yuya.kusakabe@gmail.com>2018-06-21 17:12:20 +0900
commitb01eb7ec15541b8c0c102d7601fc0be95a8a70c5 (patch)
tree7162603274ecbccccb945011a796123d15a9390a /roles/vmware/tasks/setup_iso.yml
parent8c9f3a8e7bd9a937bcc4401a27246e258c5b4e4c (diff)
downloadvyos-vm-images-b01eb7ec15541b8c0c102d7601fc0be95a8a70c5.tar.gz
vyos-vm-images-b01eb7ec15541b8c0c102d7601fc0be95a8a70c5.zip
Initial VMware support
Diffstat (limited to 'roles/vmware/tasks/setup_iso.yml')
-rw-r--r--roles/vmware/tasks/setup_iso.yml57
1 files changed, 57 insertions, 0 deletions
diff --git a/roles/vmware/tasks/setup_iso.yml b/roles/vmware/tasks/setup_iso.yml
new file mode 100644
index 0000000..18f1f5e
--- /dev/null
+++ b/roles/vmware/tasks/setup_iso.yml
@@ -0,0 +1,57 @@
+- name: Fetch VyOS ISO GPG signature
+ uri:
+ url: "{{ vyos_iso_url }}.asc"
+ dest: "{{ vyos_iso_local }}.asc"
+ status_code: 200,404,403
+ tags: verify
+ register: gpg_uri
+
+- name: Download VyOS ISO release
+ get_url:
+ url: "{{ vyos_iso_url }}"
+ dest: "{{ vyos_iso_local }}"
+
+- name: Fetch the VyOS release GPG key
+ get_url:
+ url: "{{ vyos_key_url}}"
+ dest: "{{ vyos_key_local }}"
+ tags: verify
+
+- name: Install the VyOS release GPG key
+ command: gpg --import {{ vyos_key_local }}
+ when: gpg_uri.status == 200
+ tags: verify
+
+- name: Validate ISO GPG signature
+ command: gpg --verify {{ vyos_iso_local }}.asc {{ vyos_iso_local }}
+ when: gpg_uri.status == 200
+ tags: verify
+
+- name: Mount ISO
+ mount:
+ name: "{{ CD_ROOT }}"
+ src: "{{ vyos_iso_local }}"
+ fstype: iso9660
+ opts: loop,ro
+ state: mounted
+
+- name: Verify checksums of all the files in the ISO image
+ command: md5sum -c md5sum.txt
+ args:
+ chdir: "{{ CD_ROOT }}"
+ changed_when: False
+
+- name: Mount squashfs image from ISO
+ mount:
+ name: "{{ CD_SQUASH_ROOT }}"
+ src: "{{ SQUASHFS_IMAGE }}"
+ fstype: squashfs
+ opts: loop,ro
+ state: mounted
+
+- name: Read version string from iso packages
+ shell: cat {{ CD_SQUASH_ROOT }}/opt/vyatta/etc/version | awk '{print $2}' | tr + -
+ register: version_string
+
+- name: Debug version string as read from ISO
+ debug: msg="This is version {{ version_string.stdout }}"