mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
Encrypt the vault file after editing only if the contents changed
This commit is contained in:
committed by
Abhijit Menon-Sen
parent
73aa5686cc
commit
f8bf2ba1bd
@@ -227,6 +227,10 @@ class VaultEditor(object):
|
||||
call(self._editor_shell_command(tmp_path))
|
||||
tmpdata = self.read_data(tmp_path)
|
||||
|
||||
# Do nothing if the content has not changed
|
||||
if existing_data == tmpdata:
|
||||
return
|
||||
|
||||
# create new vault
|
||||
this_vault = VaultLib(self.password)
|
||||
if cipher:
|
||||
|
||||
Reference in New Issue
Block a user