diff options
Diffstat (limited to 'cloudinit/config/cc_salt_minion.py')
-rw-r--r-- | cloudinit/config/cc_salt_minion.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cloudinit/config/cc_salt_minion.py b/cloudinit/config/cc_salt_minion.py index 986e6db6..ff90d07a 100644 --- a/cloudinit/config/cc_salt_minion.py +++ b/cloudinit/config/cc_salt_minion.py @@ -24,7 +24,7 @@ from cloudinit import util def handle(name, cfg, cloud, log, _args): # If there isn't a salt key in the configuration don't do anything if 'salt_minion' not in cfg: - log.debug(("Skipping transform named %s," + log.debug(("Skipping module named %s," " no 'salt_minion' key in configuration"), name) return @@ -34,8 +34,8 @@ def handle(name, cfg, cloud, log, _args): cloud.distro.install_packages(["salt"]) # Ensure we can configure files at the right dir - config_dir = salt_cfg.get("config_dir", '/etc/salt') - config_dir = cloud.paths.join(False, config_dir) + config_dir = cloud.paths.join(False, salt_cfg.get("config_dir", + '/etc/salt')) util.ensure_dir(config_dir) # ... and then update the salt configuration @@ -47,8 +47,8 @@ def handle(name, cfg, cloud, log, _args): # ... copy the key pair if specified if 'public_key' in salt_cfg and 'private_key' in salt_cfg: - pki_dir = salt_cfg.get('pki_dir', '/etc/salt/pki') - pki_dir = cloud.paths.join(pki_dir) + pki_dir = cloud.paths.join(False, salt_cfg.get('pki_dir', + '/etc/salt/pki')) with util.umask(077): util.ensure_dir(pki_dir) pub_name = os.path.join(pki_dir, 'minion.pub') |