1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #11740 from amenonsen/8602-rebase

Encrypt the vault file after editing only if the contents changed
This commit is contained in:
Brian Coca 2015-07-27 20:45:03 -04:00
commit 2575e1540a

View file

@ -227,6 +227,10 @@ class VaultEditor(object):
call(self._editor_shell_command(tmp_path)) call(self._editor_shell_command(tmp_path))
tmpdata = self.read_data(tmp_path) tmpdata = self.read_data(tmp_path)
# Do nothing if the content has not changed
if existing_data == tmpdata:
return
# create new vault # create new vault
this_vault = VaultLib(self.password) this_vault = VaultLib(self.password)
if cipher: if cipher: