mirror of
				https://github.com/ansible-collections/community.general.git
				synced 2025-10-26 13:56:09 -07:00 
			
		
		
		
	[PR #10121/de60ea1d backport][stable-9] Fix #10120. Split key=value where value may comprise = (#10124)
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				EOL CI / EOL Sanity (Ⓐ2.13) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL Sanity (Ⓐ2.14) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL Sanity (Ⓐ2.15) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL Units (Ⓐ2.13+py2.7) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL Units (Ⓐ2.13+py3.8) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL Units (Ⓐ2.14+py3.9) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL Units (Ⓐ2.15+py3.10) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL Units (Ⓐ2.15+py3.5) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/1/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/2/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/3/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/1/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/2/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/3/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/1/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/2/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/3/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/1/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/2/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/3/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/1/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/2/) (push) Has been cancelled
				
			
		
			
				
	
				EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/3/) (push) Has been cancelled
				
			
		
			
				
	
				nox / Run extra sanity tests (push) Has been cancelled
				
			
		
		
	
	
		
	
		
			Some checks failed
		
		
	
	EOL CI / EOL Sanity (Ⓐ2.13) (push) Has been cancelled
				
			EOL CI / EOL Sanity (Ⓐ2.14) (push) Has been cancelled
				
			EOL CI / EOL Sanity (Ⓐ2.15) (push) Has been cancelled
				
			EOL CI / EOL Units (Ⓐ2.13+py2.7) (push) Has been cancelled
				
			EOL CI / EOL Units (Ⓐ2.13+py3.8) (push) Has been cancelled
				
			EOL CI / EOL Units (Ⓐ2.14+py3.9) (push) Has been cancelled
				
			EOL CI / EOL Units (Ⓐ2.15+py3.10) (push) Has been cancelled
				
			EOL CI / EOL Units (Ⓐ2.15+py3.5) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/1/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/2/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/3/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/1/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/2/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/3/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/1/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/2/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/3/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/1/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/2/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/3/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/1/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/2/) (push) Has been cancelled
				
			EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/3/) (push) Has been cancelled
				
			nox / Run extra sanity tests (push) Has been cancelled
				
			Fix #10120. Split key=value where value may comprise = (#10121)
* Fix #10120. Split key=value where value may comprise =
* Added fragment.
* Update plugins/modules/sysrc.py
* Update changelogs/fragments/10121-sysrc-fix-split-first-separator.yml
---------
(cherry picked from commit de60ea1da4)
Co-authored-by: Vladimir Botka <vbotka@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
	
	
This commit is contained in:
		
					parent
					
						
							
								e2af16b03f
							
						
					
				
			
			
				commit
				
					
						b4468bd4c7
					
				
			
		
					 2 changed files with 3 additions and 1 deletions
				
			
		|  | @ -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. |         Use this dictionary to preform the tests. | ||||||
|         """ |         """ | ||||||
|         (rc, out, err) = self.run_sysrc('-e', '-a') |         (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: |         if self.value is None: | ||||||
|             return self.name in conf |             return self.name in conf | ||||||
|         else: |         else: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue