saltstack: fix put_file to preserve checksum (#1472) (#1514)

* saltstack: fix put_file to preserve checksum

Use hashutil.base64_decodefile to ensure that the file checksum
is preserved, since file.write only supports text files.

Signed-off-by: Zac Medico <zmedico@gmail.com>

* Update changelogs/fragments/1472-saltstack-fix-put_file-to-preserve-checksum.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 47b940fc63)

Co-authored-by: Zac Medico <zmedico@gmail.com>
This commit is contained in:
patchback[bot] 2020-12-19 18:55:57 +00:00 committed by GitHub
commit d29db3ecf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- saltstack connection plugin - use ``hashutil.base64_decodefile`` to ensure that the file checksum is preserved (https://github.com/ansible-collections/community.general/pull/1472).