mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add lstrip
This commit is contained in:
parent
c70257163b
commit
f7c7d9c7c2
1 changed files with 2 additions and 2 deletions
|
@ -145,9 +145,9 @@ def apply_(path, id_=None, config=None, approve_key=True, install=True,
|
|||
'configuring as {0}'.format(id_))
|
||||
minion_config = salt.config.minion_config(cfg_files['config'])
|
||||
pki_dir = minion_config['pki_dir']
|
||||
if not os.path.isdir(os.path.join(mpt, pki_dir)):
|
||||
if not os.path.isdir(os.path.join(mpt, pki_dir.lstrip('/'))):
|
||||
__salt__['file.makedirs'](
|
||||
os.path.join(mpt, pki_dir)
|
||||
os.path.join(mpt, pki_dir.lstrip('/'))
|
||||
)
|
||||
os.rename(cfg_files['privkey'], os.path.join(
|
||||
mpt, pki_dir.lstrip('/'), 'minion.pem'))
|
||||
|
|
Loading…
Add table
Reference in a new issue