summaryrefslogtreecommitdiff
path: root/roles/installer/openbsd/fetch/tasks/main.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-07-10 23:42:23 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-07-10 23:42:23 +0200
commitc9df5dcce462af13685236bf7a1d4dd896b1406b (patch)
tree8b7ed8bd765bb1a3a338bb4f587665b439d6b24d /roles/installer/openbsd/fetch/tasks/main.yml
parentopenbsd installer: move to single version per invocation (diff)
major refactoring of installer roles
Diffstat (limited to 'roles/installer/openbsd/fetch/tasks/main.yml')
-rw-r--r--roles/installer/openbsd/fetch/tasks/main.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/roles/installer/openbsd/fetch/tasks/main.yml b/roles/installer/openbsd/fetch/tasks/main.yml
new file mode 100644
index 00000000..0ab9070c
--- /dev/null
+++ b/roles/installer/openbsd/fetch/tasks/main.yml
@@ -0,0 +1,34 @@
+---
+- name: prepare directories for installer iso files
+ file:
+ name: "{{ installer_base_path }}/openbsd-{{ openbsd_installer_version }}/{{ openbsd_installer_arch }}"
+ state: directory
+
+- name: download installer iso files
+ get_url:
+ url: "{{ openbsd_installer_url }}/{{ openbsd_installer_version }}/{{ openbsd_installer_arch }}/install{{ openbsd_installer_version_short }}.iso"
+ dest: "{{ installer_base_path }}/openbsd-{{ openbsd_installer_version }}/{{ openbsd_installer_arch }}/install{{ openbsd_installer_version_short }}.iso"
+ mode: 0644
+ force: "{{ openbsd_installer_force_download }}"
+
+- name: download signed sha256 files
+ get_url:
+ url: "{{ openbsd_installer_url }}/{{ openbsd_installer_version }}/{{ openbsd_installer_arch }}/SHA256.sig"
+ dest: "{{ installer_base_path }}/openbsd-{{ openbsd_installer_version }}/{{ openbsd_installer_arch }}/SHA256.sig"
+ mode: 0644
+ force: "{{ openbsd_installer_force_download }}"
+
+- name: create signing key files
+ copy:
+ content: "{{ openbsd_installer_signing_keys[openbsd_installer_version] }}"
+ dest: "{{ installer_base_path }}/openbsd-{{ openbsd_installer_version }}/openbsd-{{ openbsd_installer_version_short }}-base.pub"
+
+- name: verfiy downloaded iso files
+ command: "signify-openbsd -Cp ../openbsd-{{ openbsd_installer_version_short }}-base.pub -x SHA256.sig install{{ openbsd_installer_version_short }}.iso"
+ args:
+ chdir: "{{ installer_base_path }}/openbsd-{{ openbsd_installer_version }}/{{ openbsd_installer_arch }}"
+ changed_when: false
+ register: openbsd_installer_signify_result
+
+- debug:
+ var: openbsd_installer_signify_result.stdout_lines