summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_chef.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2014-10-11 18:51:33 -0700
committerJoshua Harlow <harlowja@gmail.com>2014-10-11 18:51:33 -0700
commit0a2e8b0130c2f83c0ea555d26473c92098c6adda (patch)
treed110c03e714f4690426f4e0c82193018a6af50e4 /cloudinit/config/cc_chef.py
parent1f969e30983f93eed2ece906a6ca9d16bc0aed86 (diff)
downloadvyos-cloud-init-0a2e8b0130c2f83c0ea555d26473c92098c6adda.tar.gz
vyos-cloud-init-0a2e8b0130c2f83c0ea555d26473c92098c6adda.zip
Always ensure we create the /etc/chef dir
Diffstat (limited to 'cloudinit/config/cc_chef.py')
-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'