mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* Add expand_user_and_vars flag to write
Closes #5234
* Add changelog
* Update changelogs/fragments/5243-osx-defaults-expand-user-flags.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f929422dac
)
Co-authored-by: Pavel Zwerschke <pavelzw@gmail.com>
This commit is contained in:
parent
21ad7c8bfa
commit
bc32914424
2 changed files with 4 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- osx_defaults - no longer expand ``~`` in ``value`` to the user's home directory, or expand environment variables (https://github.com/ansible-collections/community.general/issues/5234, https://github.com/ansible-collections/community.general/pull/5243).
|
|
@ -304,7 +304,8 @@ class OSXDefaults(object):
|
|||
if not isinstance(value, list):
|
||||
value = [value]
|
||||
|
||||
rc, out, err = self.module.run_command(self._base_command() + ['write', self.domain, self.key, '-' + self.type] + value)
|
||||
rc, out, err = self.module.run_command(self._base_command() + ['write', self.domain, self.key, '-' + self.type] + value,
|
||||
expand_user_and_vars=False)
|
||||
|
||||
if rc != 0:
|
||||
raise OSXDefaultsException('An error occurred while writing value to defaults: %s' % out)
|
||||
|
|
Loading…
Reference in a new issue