diff options
author | Joshua Harlow <harlowja@gmail.com> | 2014-10-11 18:47:06 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2014-10-11 18:47:06 -0700 |
commit | 1f969e30983f93eed2ece906a6ca9d16bc0aed86 (patch) | |
tree | f60bf97ce16042a1297e0eee11629edee06cb2bf /cloudinit/config/cc_chef.py | |
parent | 4994f7cb475713be523f96e077a76f801e6d1db5 (diff) | |
download | vyos-cloud-init-1f969e30983f93eed2ece906a6ca9d16bc0aed86.tar.gz vyos-cloud-init-1f969e30983f93eed2ece906a6ca9d16bc0aed86.zip |
Use the util function to get the chef base directories
Diffstat (limited to 'cloudinit/config/cc_chef.py')
-rw-r--r-- | cloudinit/config/cc_chef.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cloudinit/config/cc_chef.py b/cloudinit/config/cc_chef.py index 205f4b49..fb8d7641 100644 --- a/cloudinit/config/cc_chef.py +++ b/cloudinit/config/cc_chef.py @@ -118,7 +118,10 @@ def handle(name, cfg, cloud, log, _args): chef_cfg = cfg['chef'] # Ensure the chef directories we use exist - for d in list(chef_cfg.get('directories', CHEF_DIRS)): + chef_dirs = util.get_cfg_option_list(chef_cfg, 'directories') + if not chef_dirs: + chef_dirs = list(CHEF_DIRS) + for d in chef_dirs: util.ensure_dir(d) # Set the validation key based on the presence of either 'validation_key' |