mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
[PR #8185/9307b76e backport][stable-8] fix: Ensuring interpolation is disabled for ConfigParser (#8210)
fix: Ensuring interpolation is disabled for ConfigParser (#8185)
* fix: Ensuring interpolation is disabled for ConfigParser
This PR disables interpolation of ConfigParser and adds test coverage for that.
* Adding changelog fragment
* Fixing missing extension of changelog fragment
* Adding issue link to changelog fragment
* Update changelogs/fragments/8183-from_ini_to_ini.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9307b76e74)
Co-authored-by: Steffen Scheib <37306894+sscheib@users.noreply.github.com>
This commit is contained in:
@@ -12,15 +12,21 @@
|
||||
another_section:
|
||||
connection: 'ssh'
|
||||
|
||||
interpolate_test:
|
||||
interpolate_test_key: '%'
|
||||
|
||||
- name: 'Write INI file that reflects ini_test_dict to {{ ini_test_file }}'
|
||||
ansible.builtin.copy:
|
||||
dest: '{{ ini_test_file }}'
|
||||
content: |
|
||||
[section_name]
|
||||
key_name=key value
|
||||
key_name = key value
|
||||
|
||||
[another_section]
|
||||
connection=ssh
|
||||
connection = ssh
|
||||
|
||||
[interpolate_test]
|
||||
interpolate_test_key = %
|
||||
|
||||
- name: 'Slurp the test file: {{ ini_test_file }}'
|
||||
ansible.builtin.slurp:
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
another_section:
|
||||
connection: 'ssh'
|
||||
|
||||
interpolate_test:
|
||||
interpolate_test_key: '%'
|
||||
|
||||
- name: 'Write INI file manually to {{ ini_test_file }}'
|
||||
ansible.builtin.copy:
|
||||
dest: '{{ ini_test_file }}'
|
||||
@@ -26,6 +29,9 @@
|
||||
[another_section]
|
||||
connection = ssh
|
||||
|
||||
[interpolate_test]
|
||||
interpolate_test_key = %
|
||||
|
||||
- name: 'Slurp the manually created test file: {{ ini_test_file }}'
|
||||
ansible.builtin.slurp:
|
||||
src: '{{ ini_test_file }}'
|
||||
|
||||
Reference in New Issue
Block a user