mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-27 05:43:09 +00:00
* Fix #10120. Split key=value where value may comprise = * Added fragment. * Update plugins/modules/sysrc.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update changelogs/fragments/10121-sysrc-fix-split-first-separator.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- "sysrc - split the output of ``sysrc -e -a`` on the first ``=`` only (https://github.com/ansible-collections/community.general/issues/10120, https://github.com/ansible-collections/community.general/pull/10121)."
|
||||
@@ -130,7 +130,7 @@ class Sysrc(object):
|
||||
Use this dictionary to preform the tests.
|
||||
"""
|
||||
(rc, out, err) = self.run_sysrc('-e', '-a')
|
||||
conf = dict([i.split('=') for i in out.splitlines()])
|
||||
conf = dict([i.split('=', 1) for i in out.splitlines()])
|
||||
if self.value is None:
|
||||
return self.name in conf
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user