The parameter `environment` is misspelled as `enviroment` in the heat
module/state. Fix the typo, document the rename, and add support for the
misspelled version for backward compatibility.
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
Allow users to specify a __env__ pillar_root directory that applies
equally to all environments that are not explicitly specified.
fixes#20581
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
This makes the following changes:
- The `append_newline` argument to the `file.blockreplace`
remote-execution function has been modified so that if its value is
`None`, it only appends a newline when the content block does not end
in one.
- A couple of fixes were made to newline handling. The existing code
normalized the newlines in the content block, replacing them with
os.linesep. However, when the file contains newlines that don't match
the OS (i.e. POSIX newlines in a file on a Windows box, or Windows
newlines on a Linux/Mac/BSD/etc. box), then we would still end up with
mixed newlines. The line separator is now detected when we read in the
original file, and the detected line separator is used when writing
the content block. Additionally, the same newline mismatch was
possible when appending/prepending the content block. This has been
fixed by using a common function for appending, prepending, and
replacing the content block.
- Support for the `append_newline` argument has been added to the
`file.blockreplace` state. The default value for the state is `None`.
A `versionchanged` has been added to the remote execution function to
let users know that the Fluorine release will change the default value
of that variable.
- 20 new integration tests have been written to test the
`file.blockreplace` state.
Exposes the `_key_exists` function in the reg.py module as `key_exists`
Fixes an issue where `key_exists` was throwing an error when the key
didn't exist
Fixes a problem with the `broadcast_change` function in the
`win_functions` salt util. It was using `unicode_literals` and those
aren't implemented until 2018.3. The ctypes.WinDLL function is expecting
a string value, not unicode
Have the __virtual__ function for win_snmp use the `key_exists` function
to detect the presence of the SNMP key in the registry. This will fail
gracefully if it doesn't exist
When no SSH client is installed, salt will create an empty
SaltSystemExit exception:
Traceback (most recent call last):
File "tests/unit/ssh/test_ssh.py", line 42, in test_password_failure
client = ssh.SSH(opts)
File "salt/client/ssh/__init__.py", line 226, in __init__
raise salt.exceptions.SaltSystemExit('No ssh binary found in path -- ssh must be '
salt.exceptions.SaltSystemExit: None
The SaltSystemExit exception takes two parameters: code and msg.
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
There is a note about deprecating cmd.wait in the docs of the cmd state.
However, this function has not been put on an official deprecation path
and there are no plans to deprecate it. Therefore, we shouldn't have
this note in the docs.
See #44831 for more information.
We had a similar check to ensure "foo: bar" isn't loaded as a dict, this
adds a check to ensure that we only load lists when there is a leading
bracket.