From 7c0a2aeeb03d8f202b5afd63dd21f0db699f83a0 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Mon, 20 Mar 2023 13:24:50 -0500 Subject: [PATCH] Add safe navigation to .include method for automatev2 recipe (#7) Signed-off-by: Corey Hemminger --- CHANGELOG.md | 4 ++++ metadata.rb | 2 +- recipes/chef_automatev2.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69331cc..f5f5f74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ This file is used to list changes made in each version of the chef_software cookbook. +## 2.1.1 (20232-03-20) + +- [Corey Hemminger] - Add safe navigation to .include method for automatev2 recipe + ## 2.1.0 (20232-03-17) - [Corey Hemminger] - Add Integrated Infra-Server user and org config to automate recipe diff --git a/metadata.rb b/metadata.rb index b651115..99759fc 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'hemminger@hotmail.com' license 'Apache-2.0' description 'Installs/Configures chef server, chef automate2, chef supermarket' -version '2.1.0' +version '2.1.1' chef_version '>= 16.4' issues_url 'https://github.com/Stromweld/chef_software/issues' diff --git a/recipes/chef_automatev2.rb b/recipes/chef_automatev2.rb index bc1d555..8a0d0a5 100644 --- a/recipes/chef_automatev2.rb +++ b/recipes/chef_automatev2.rb @@ -32,7 +32,7 @@ end end -if node['chef_software']['chef_automatev2']['products'].include?('infra-server') +if node['chef_software']['chef_automatev2']['products']&.include?('infra-server') node['chef_software']['chef_user']&.each do |name, hash| chef_user name do hash&.each do |key, value|