From 1b9a4aad17024c31f5e5a13f96fa29c705b2fd1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Wed, 22 Jan 2020 12:32:38 +0100 Subject: [PATCH] Work around a bug in Chef's snap_package resource https://github.com/chef/chef/issues/8827 `snap install` returns 0 when a package is already installed, so no need for a guard clause --- site-cookbooks/kosmos-bitcoin/recipes/snapd.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site-cookbooks/kosmos-bitcoin/recipes/snapd.rb b/site-cookbooks/kosmos-bitcoin/recipes/snapd.rb index a19b861..0a777fc 100644 --- a/site-cookbooks/kosmos-bitcoin/recipes/snapd.rb +++ b/site-cookbooks/kosmos-bitcoin/recipes/snapd.rb @@ -25,9 +25,9 @@ # THE SOFTWARE. # -package 'snapd' - -snap_package 'bitcoin-core' +# FIXME: Switch to the snap_package resource when it gets fixed: +# https://github.com/chef/chef/issues/8827 +execute "snap install bitcoin-core" bitcoin_user = node['bitcoin']['username'] bitcoin_group = node['bitcoin']['usergroup']