From 0a2e8b0130c2f83c0ea555d26473c92098c6adda Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Sat, 11 Oct 2014 18:51:33 -0700 Subject: Always ensure we create the /etc/chef dir --- cloudinit/config/cc_chef.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cloudinit') diff --git a/cloudinit/config/cc_chef.py b/cloudinit/config/cc_chef.py index fb8d7641..ff08050d 100644 --- a/cloudinit/config/cc_chef.py +++ b/cloudinit/config/cc_chef.py @@ -18,6 +18,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +import itertools import json import os @@ -35,6 +36,9 @@ CHEF_DIRS = [ '/var/backups/chef', '/var/run/chef', ] +REQUIRED_CHEF_DIRS = [ + '/etc/chef', +] OMNIBUS_URL = "https://www.opscode.com/chef/install.sh" OMNIBUS_URL_RETRIES = 5 @@ -121,7 +125,7 @@ def handle(name, cfg, cloud, log, _args): chef_dirs = util.get_cfg_option_list(chef_cfg, 'directories') if not chef_dirs: chef_dirs = list(CHEF_DIRS) - for d in chef_dirs: + for d in itertools.chain(chef_dirs, REQUIRED_CHEF_DIRS): util.ensure_dir(d) # Set the validation key based on the presence of either 'validation_key' -- cgit v1.2.3