When appending content to a file, salt will try to search for that content first. During this
operation whitespace is ignored. This option allows to override this bahavior.
Fixes#28586.
This overrides the state_verbose setting that may be set in master config.
If master has state_verbose set to True
--state-verbose=False would suppress states that didn't change.
If master config has state_verbose set to False
--state-verbose=True would still show states that didn't have changes.
Below is test output with state_verbose=True in ./etc/salt/master:
```
$ salt -c ./etc/salt '*' --state-verbose=True state.highstate
salt-dev:
----------
ID: test_file.txt
Function: file.managed
Name: /tmp/test_file.txt
Result: True
Comment: File /tmp/test_file.txt exists with proper permissions. No changes made.
Started: 13:51:15.798599
Duration: 7.176 ms
Changes:
Summary for salt-dev
------------
Succeeded: 1
Failed: 0
------------
Total states run: 1
Total run time: 7.176 ms
$ salt -c ./etc/salt '*' --state-verbose=False state.highstate
salt-dev:
Summary for salt-dev
------------
Succeeded: 1
Failed: 0
------------
Total states run: 1
Total run time: 8.589 ms
```
Looks like atomic_open() doesn't take care of preserving file permissions. It will create
a new file, edit it and then move this temp file to the original file ignoring file permissions.
Also updated the check to be sure file exist and is a file. Otherwise code will try to update
directory content and will fail badly and throw a python error.
Warnings for passing kwargs with equal signs as part of the value
exist in other file.x functions, but was missing for the file.line
execution module function. This adds the relevant warning.
Fixes#28923
If you specify a profile, you need to have key, keyid, and region set within
the profile. If region is set outside of the profile group, it is ignored,
and a default region is used.
This pull request updates the docs to model this usage correctly.
This fixes the file.serialize state on windows.
Currently, it fails on the first run (with "Failed to change group to Administrators" and succeeds on runs afterwards.