summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cloudinit/config/cc_chef.py6
1 files changed, 5 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>.
+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'