mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Bit by os.path.join not liking leading /
join ignores all path components to the left of any component that starts with a /. Tested and found working. Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
This commit is contained in:
parent
32ef6fc571
commit
4a29e5eec5
1 changed files with 3 additions and 3 deletions
|
@ -89,11 +89,11 @@ class AdminUserCredentialsPublicKey(Task):
|
||||||
|
|
||||||
username = info.manifest.plugins['admin_user']['username']
|
username = info.manifest.plugins['admin_user']['username']
|
||||||
|
|
||||||
ssh_file = os.path.join('/home/', username, '.ssh/authorized_keys')
|
ssh_file = os.path.join('/home', username, '.ssh/authorized_keys')
|
||||||
rel_ssh_file = os.path.join(info.root, ssh_file)
|
rel_ssh_file = os.path.join(info.root, 'home', username, '.ssh/authorized_keys')
|
||||||
|
|
||||||
ssh_dir = os.path.dirname(ssh_file)
|
ssh_dir = os.path.dirname(ssh_file)
|
||||||
rel_ssh_dir = os.path.join(info.root, ssh_dir)
|
rel_ssh_dir = os.path.dirname(rel_ssh_file)
|
||||||
if not os.path.exists(rel_ssh_dir):
|
if not os.path.exists(rel_ssh_dir):
|
||||||
log.debug('Creating %s.' % rel_ssh_dir)
|
log.debug('Creating %s.' % rel_ssh_dir)
|
||||||
os.mkdir(rel_ssh_dir)
|
os.mkdir(rel_ssh_dir)
|
||||||
|
|
Loading…
Add table
Reference in a new issue