From 160220cf5e101e4d42cd76c49828d95808fa4f7d Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Sun, 22 Nov 2020 21:07:44 +0000 Subject: [PATCH] improvement: add checksums to downloads This now verifies that the download I am downloading is the one I want. All checksums are sha256 --- manifests/root.pp | 10 ++++++---- site-modules/vscode/manifests/init.pp | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/manifests/root.pp b/manifests/root.pp index feddd11..a59ea3c 100644 --- a/manifests/root.pp +++ b/manifests/root.pp @@ -43,15 +43,17 @@ node default { # Install alacritty from deb archive is not available # archive { '/tmp/alacritty.deb': - ensure => present, - source => 'https://github.com/alacritty/alacritty/releases/download/v0.4.3/Alacritty-v0.4.3-ubuntu_18_04_amd64.deb' + ensure => present, + source => 'https://github.com/alacritty/alacritty/releases/download/v0.4.3/Alacritty-v0.4.3-ubuntu_18_04_amd64.deb', + checksum => 'f4e40511e1e1495d15e518f5bfccfff2ed69b171ff53964622c1e66bbe954000', + checksum_type => 'sha256', } package { 'alacritty': ensure => present, provider => dpkg, - source => '/tmp/alacritty.deb', - require => [ + source => '/tmp/alacritty.deb', + require => [ Archive['/tmp/alacritty.deb'] ], } diff --git a/site-modules/vscode/manifests/init.pp b/site-modules/vscode/manifests/init.pp index 3738707..05bbd81 100644 --- a/site-modules/vscode/manifests/init.pp +++ b/site-modules/vscode/manifests/init.pp @@ -1,8 +1,10 @@ class vscode { archive { '/tmp/microsoft.asc': - ensure => present, - source => 'https://packages.microsoft.com/keys/microsoft.asc', + ensure => present, + source => 'https://packages.microsoft.com/keys/microsoft.asc', + checksum => '2cfd20a306b2fa5e25522d78f2ef50a1f429d35fd30bd983e2ebffc2b80944fa', + checksum_type => 'sha256', } exec { 'gpg --dearmor /tmp/microsoft.asc':