Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
87954f21
Commit
87954f21
authored
Oct 19, 2012
by
Stephen Fromm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use os.path.join where appropriate
parent
63ba4411
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
library/user
+3
-3
No files found.
library/user
View file @
87954f21
...
...
@@ -354,7 +354,7 @@ def get_ssh_key_path(user, ssh_file):
if
os
.
path
.
isabs
(
ssh_file
):
ssh_key_file
=
ssh_file
else
:
ssh_key_file
=
"
%
s/
%
s"
%
(
info
[
5
],
ssh_file
)
ssh_key_file
=
os
.
path
.
join
(
info
[
5
],
ssh_file
)
return
ssh_key_file
def
ssh_key_gen
(
module
,
user
,
ssh
):
...
...
@@ -419,7 +419,7 @@ def main():
'passphrase'
:
None
,
'comment'
:
'ansible-generated'
}
ssh_defaults
[
'file'
]
=
'.ssh/id_
%
s'
%
ssh_defaults
[
'type'
]
ssh_defaults
[
'file'
]
=
os
.
path
.
join
(
'.ssh'
,
'id_
%
s'
%
ssh_defaults
[
'type'
])
ssh
=
dict
(
ssh_defaults
)
module
=
AnsibleModule
(
argument_spec
=
dict
(
...
...
@@ -473,7 +473,7 @@ def main():
ssh
[
'passphrase'
]
=
module
.
params
[
'ssh_key_passphrase'
]
# If using default filename, make sure it is named appropriately
if
ssh
[
'file'
]
==
ssh_defaults
[
'file'
]:
ssh
[
'file'
]
=
'.ssh/id_
%
s'
%
ssh
[
'type'
]
ssh
[
'file'
]
=
os
.
path
.
join
(
'.ssh'
,
'id_
%
s'
%
ssh_defaults
[
'type'
])
rc
=
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment