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
b8405301
Commit
b8405301
authored
Aug 26, 2015
by
Abhijit Menon-Sen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the filename the first argument to rekey_file
parent
c4b2540e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
lib/ansible/cli/vault.py
+1
-1
lib/ansible/parsing/vault/__init__.py
+1
-1
test/units/parsing/vault/test_vault_editor.py
+1
-1
No files found.
lib/ansible/cli/vault.py
View file @
b8405301
...
...
@@ -128,6 +128,6 @@ class VaultCLI(CLI):
__
,
new_password
=
self
.
ask_vault_passwords
(
ask_vault_pass
=
False
,
ask_new_vault_pass
=
True
,
confirm_new
=
True
)
for
f
in
self
.
args
:
self
.
editor
.
rekey_file
(
new_password
,
f
)
self
.
editor
.
rekey_file
(
f
,
new_password
)
self
.
display
.
display
(
"Rekey successful"
,
stderr
=
True
)
lib/ansible/parsing/vault/__init__.py
View file @
b8405301
...
...
@@ -336,7 +336,7 @@ class VaultEditor:
else
:
raise
AnsibleError
(
"
%
s is already encrypted"
%
filename
)
def
rekey_file
(
self
,
new_password
,
filename
):
def
rekey_file
(
self
,
filename
,
new_password
):
check_prereqs
()
...
...
test/units/parsing/vault/test_vault_editor.py
View file @
b8405301
...
...
@@ -185,7 +185,7 @@ class TestVaultEditor(unittest.TestCase):
# make sure the password functions for the cipher
error_hit
=
False
try
:
ve
.
rekey_file
(
'ansible2'
,
v10_file
.
name
)
ve
.
rekey_file
(
v10_file
.
name
,
'ansible2'
)
except
errors
.
AnsibleError
as
e
:
error_hit
=
True
...
...
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