[WARNING ] State for file: /boot/grub/grub.cfg – Neither ‘source’ nor
‘contents’ nor ‘contents_pillar’ nor ‘contents_grains’ was defined,
yet ‘replace’ was set to ‘True’. As there is no source to replace the
file with, ‘replace’ has been set to ‘False’ to avoid reading the file
It expects a source directive, but I don’t want to download the file to the minion, I just need to change file permissions.
file.exists function doesn’t have a user, group and mode directives.
Doing cmd.run would obviously remove this message, but it’s too generic and is more like a workaround here. More salty approach would be to use file.managed state because this is what it was designed for.