From a5c2a34141361f10aeeaecbcdcf674c51478a554 Mon Sep 17 00:00:00 2001 From: k-ta-yamada Date: Wed, 22 Nov 2017 17:50:14 +0900 Subject: [PATCH] [fix] rpm -q package_name is static #18 --- cookbooks/postgresql/default.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cookbooks/postgresql/default.rb b/cookbooks/postgresql/default.rb index cba2921..d036dd9 100644 --- a/cookbooks/postgresql/default.rb +++ b/cookbooks/postgresql/default.rb @@ -2,7 +2,9 @@ # yum install # ################################################## package node[:postgresql][:rpm] do - not_if 'rpm -q pgdg-centos96-9.6-3' + # not_if 'rpm -q pgdg-centos96-9.6-3' + # not_if 'rpm -q pgdg-redhat96-9.6-3' + not_if "rpm -q #{File.basename(node[:postgresql][:rpm], '.noarch.rpm')}" end node[:postgresql][:pkg].each do |pkg|