Search code examples
salt-project

Check the hash of files by saltstack when copying


I'm interesting in how saltstack checks

  1. if file already exists
  2. if file is not corrupted

when it copies files.

Does it check hash sum of file and its content, or only file names? Especially when file.recurse state is used for copying directories.

Does anybody know how to iterate through the directory content and check hash sum for files?

I understand that here is a few questions, but it is important to imagine the big picture of copying process.


Solution

  • Salt compares the hash sums of the files to decide if a download is needed.