From 8d6c1b68894b2dbe927a16e0078c2e9946d8a179 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Wed, 21 Apr 2021 21:30:23 +0700 Subject: [PATCH] Add checksum to metal ISO installer file Avoid redownload the ISO and check the ISO integrity --- metal/group_vars/all.yml | 1 + metal/roles/pxe-boot/tasks/server.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/metal/group_vars/all.yml b/metal/group_vars/all.yml index 273c3bdf..b5a71cb8 100644 --- a/metal/group_vars/all.yml +++ b/metal/group_vars/all.yml @@ -1,4 +1,5 @@ iso_url: "https://mirrors.nhanhoa.com/centos/8.3.2011/isos/x86_64/CentOS-8.3.2011-x86_64-dvd1.iso" +iso_checksum: "sha256:aaf9d4b3071c16dbbda01dfe06085e5d0fdac76df323e3bbe87cce4318052247" disk: "sda" dns_server: "8.8.8.8" diff --git a/metal/roles/pxe-boot/tasks/server.yml b/metal/roles/pxe-boot/tasks/server.yml index 9aa3f222..25724111 100644 --- a/metal/roles/pxe-boot/tasks/server.yml +++ b/metal/roles/pxe-boot/tasks/server.yml @@ -16,6 +16,7 @@ get_url: url: "{{ iso_url }}" dest: "{{ role_path }}/build/images/centos8.iso" + checksum: "{{ iso_checksum }}" delegate_to: localhost - name: Mount the ISO