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
1diff --git a/cloudinit/config/cc_salt_minion.py b/cloudinit/config/cc_salt_minion.py
2index f5786a3..13d70c8 100644
3--- a/cloudinit/config/cc_salt_minion.py
4+++ b/cloudinit/config/cc_salt_minion.py
5@@ -46,7 +46,12 @@ def handle(name, cfg, cloud, log, _args):
6
7 # ... copy the key pair if specified
8 if 'public_key' in salt_cfg and 'private_key' in salt_cfg:
9- pki_dir = salt_cfg.get('pki_dir', '/etc/salt/pki')
10+ if os.path.isdir("/etc/salt/pki/minion"):
11+ pki_dir_default = "/etc/salt/pki/minion"
12+ else:
13+ pki_dir_default = "/etc/salt/pki"
14+
15+ pki_dir = salt_cfg.get('pki_dir', pki_dir_default)
16 with util.umask(0o77):
17 util.ensure_dir(pki_dir)
18 pub_name = os.path.join(pki_dir, 'minion.pub')

Subscribers

People subscribed via source and target branches