content icon indicating copy to clipboard operation
content copied to clipboard

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

Open vojtapolasek opened this issue 3 years ago • 0 comments

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.

vojtapolasek avatar Aug 09 '22 11:08 vojtapolasek