Skip to content

[DO NOT MERGE] Support XCCDF Values containing newlines in Ansible Playbooks#2305

Draft
jan-cerny wants to merge 1 commit intoOpenSCAP:mainfrom
jan-cerny:ansible_multiline_variable
Draft

[DO NOT MERGE] Support XCCDF Values containing newlines in Ansible Playbooks#2305
jan-cerny wants to merge 1 commit intoOpenSCAP:mainfrom
jan-cerny:ansible_multiline_variable

Conversation

@jan-cerny
Copy link
Member

When generating Ansible Playbooks from SCAP content, the values of XCCDF Values are extracted from Ansible code and added to the vars key in the generated Playbook. However, if the value contains newlines, the generated Playbook is invalid, because the inserted string isn't properly indented. This patch adds support for multi-line values. If the value will contain newlines, it will be indented and inserted as a YAML scalar block.

When generating Ansible Playbooks from SCAP content, the values
of XCCDF Values are extracted from Ansible code and added to the
`vars` key in the generated Playbook. However, if the value contains
newlines, the generated Playbook is invalid, because the inserted
string isn't properly indented. This patch adds support for multi-line
values. If the value will contain newlines, it will be indented and
inserted as a YAML scalar block.
@jan-cerny jan-cerny changed the title Support XCCDF Values containing newlines in Ansible Playbooks [DO NOT MERGE] Support XCCDF Values containing newlines in Ansible Playbooks Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant