Merge ~smoser/cloud-init:salt-1609899 into cloud-init:master

Proposed by Scott Moser
Status: Merged
Merged at revision: 30ca98c3bf7762c878bc6834807e262a3cbe8c2c
Proposed branch: ~smoser/cloud-init:salt-1609899
Merge into: cloud-init:master
Diff against target: 18 lines (+6/-1)
1 file modified
cloudinit/config/cc_salt_minion.py (+6/-1)
Reviewer Review Type Date Requested Status
Ryan Harper Approve
Review via email: mp+304415@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ryan Harper (raharper) :
review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/cloudinit/config/cc_salt_minion.py b/cloudinit/config/cc_salt_minion.py
index f5786a3..13d70c8 100644
--- a/cloudinit/config/cc_salt_minion.py
+++ b/cloudinit/config/cc_salt_minion.py
@@ -46,7 +46,12 @@ def handle(name, cfg, cloud, log, _args):
4646
47 # ... copy the key pair if specified47 # ... copy the key pair if specified
48 if 'public_key' in salt_cfg and 'private_key' in salt_cfg:48 if 'public_key' in salt_cfg and 'private_key' in salt_cfg:
49 pki_dir = salt_cfg.get('pki_dir', '/etc/salt/pki')49 if os.path.isdir("/etc/salt/pki/minion"):
50 pki_dir_default = "/etc/salt/pki/minion"
51 else:
52 pki_dir_default = "/etc/salt/pki"
53
54 pki_dir = salt_cfg.get('pki_dir', pki_dir_default)
50 with util.umask(0o77):55 with util.umask(0o77):
51 util.ensure_dir(pki_dir)56 util.ensure_dir(pki_dir)
52 pub_name = os.path.join(pki_dir, 'minion.pub')57 pub_name = os.path.join(pki_dir, 'minion.pub')

Subscribers

People subscribed via source and target branches