ansible-lint icon indicating copy to clipboard operation
ansible-lint copied to clipboard

autofix: python objects gets reformatting wrongly in yaml files

Open ssbarnea opened this issue 2 weeks ago • 0 comments

Summary

When using autofix a change like below will be seen, which breaks the files. This was observed with devtools mkdocs.yml files, which happen to make use of this unpopular YAML feature (constructor tags):

format: !!python/name:pymdownx.superfences.fence_code_format
format: !!%20%20python/name:pymdownx.superfences.fence_code_format
Issue Type
  • Bug Report
OS / ENVIRONMENT
ansible-lint --version
  • ansible installation method: one of source, pip, OS package
  • ansible-lint installation method: one of source, pip, OS package
STEPS TO REPRODUCE

Desired Behavior

Possible security bugs should be reported via email to [email protected]

Actual Behavior

Please give some details of what is happening. Include a minimum complete verifiable example with:

  • minimized playbook to reproduce the error
  • the output of running ansible-lint including the command line used
  • if you're getting a stack trace, also the output of ansible-playbook --syntax-check playbook

ssbarnea avatar Jun 17 '24 11:06 ssbarnea