From 8fdafa1484bbfa7da9aeb787df22b797666cf145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Thu, 10 Oct 2019 12:34:55 +0200 Subject: [PATCH] Set attribute whitelists for Knife-Zero This prevents all attributes to be written in the node files. We don't want that data stored in git. See https://knife-zero.github.io/40_configuration/ --- .chef/config.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.chef/config.rb b/.chef/config.rb index cd8442c..88245e4 100644 --- a/.chef/config.rb +++ b/.chef/config.rb @@ -11,3 +11,24 @@ local_mode true # Chef local mode, replacing Solo cookbook_copyright 'Kosmos' cookbook_license 'none' cookbook_email 'mail@kosmos.org' + +# Knife-Zero config, see https://knife-zero.github.io/40_configuration/ +# Prevent attributes from being saved to the node files +knife[:automatic_attribute_whitelist] = %w[ + fqdn + os + os_version + hostname + ipaddress + roles + recipes + ipaddress + platform + platform_version + cloud + cloud_v2 + chef_packages +] +knife[:default_attribute_whitelist] = [] +knife[:normal_attribute_whitelist] = ['knife_zero'] +knife[:override_attribute_whitelist] = []