salt
salt copied to clipboard
file.line should create the file if it doesn't exist.
Platform: Ubuntu 14.04.3 LTS Salt Version: salt 2015.8.3 (Beryllium)
I'm trying to make sure a file exists with one particular line, but not completely manage the contents so other processes can also add content to it. I could use file.touch as a requirement, but I shouldn't have to and it doesn't actually work because of #31135. If file.line just created the file, it would make it a lot easier, and it seems like the expected behavior.
@jeffreyctang, thanks for the report. We could add a create option to the function to create the file if it doesn't exist, which could run a file.touch first.