From 02db2c3ecf29924690d4c4adf6ec059f36f31103 Mon Sep 17 00:00:00 2001 From: Ben Hughes Date: Mon, 26 Apr 2021 21:19:26 +0100 Subject: Fix chef module run failure when chef_license is set (#868) Move chef_license from TPL_PATH_KEYS to TPL_KEYS as the chef license setting is not a path but must be added to the client config template. Fixes file or folder not found exception raised from ensure_dirs. --- cloudinit/config/cc_chef.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cloudinit/config') diff --git a/cloudinit/config/cc_chef.py b/cloudinit/config/cc_chef.py index aaf71366..7b20222e 100644 --- a/cloudinit/config/cc_chef.py +++ b/cloudinit/config/cc_chef.py @@ -70,7 +70,6 @@ CHEF_RB_TPL_PATH_KEYS = frozenset([ 'json_attribs', 'pid_file', 'encrypted_data_bag_secret', - 'chef_license', ]) CHEF_RB_TPL_KEYS = list(CHEF_RB_TPL_DEFAULTS.keys()) CHEF_RB_TPL_KEYS.extend(CHEF_RB_TPL_BOOL_KEYS) @@ -80,6 +79,7 @@ CHEF_RB_TPL_KEYS.extend([ 'node_name', 'environment', 'validation_name', + 'chef_license', ]) CHEF_RB_TPL_KEYS = frozenset(CHEF_RB_TPL_KEYS) CHEF_RB_PATH = '/etc/chef/client.rb' -- cgit v1.2.3