ComplianceAsCode / ComplianceAsCode/content

Ansible profile playbooks are failing ansible-lint because of wrong indentation

Open
#9,314 0 comments 0 reactions 0 assignees View on GitHub
Ansible Infrastructure triaged
Dominant language
Shell
Stars
2.8k
Forks
828
Avg merge
3d 8m
Merged PRs (30d)
80

Description

#### Description of problem:

When you build a product which has ansible playbooks and enable tests for linting of playbooks, they fail. I think the reason is that when a list is defined (e.g. tags), the definition of list items is not indented with respect to the list. For example it should be:
````
tags:
- some_tag
````

But now there is:

````
tags:
- some_tag
````

#### SCAP Security Guide Version:
Master as of 2022-08-09

#### Operating System Version:
RHEL9

#### Steps to Reproduce:

1. edit CmakeLists.txt and set the option ANSIBLE_CHECKS to ON.
2. build RHEL9 content
3. cd build/
4. ctest -R '.*ansible.*'

#### Actual Results:
There will be many warnings about Ansible syntax check errors related to indentation.

#### Expected Results:
No warningss

#### Additional Information/Debugging Steps:

I think it is caused by PR #8588 which introduced a new yaml dumper.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.