ansible-role-docker-compose-generator icon indicating copy to clipboard operation
ansible-role-docker-compose-generator copied to clipboard

Allow .j2 ending on .yml/.yaml files

Open oytal opened this issue 4 months ago • 0 comments

This PR updates the template file selection regex to support optional .j2 extensions, enabling Jinja syntax highlighting and preventing editor errors when using Jinja variables in compose.yml files.

Old: selectattr('path', 'regex', '.ya?ml$') | New: selectattr('path', 'regex', '\.ya?ml(\.j2)?$') |

This change allows files like compose.yaml.j2 and compose.yml.j2 to be recognized alongside standard YAML files.

I've tested this change in my own setup and confirmed it does not break existing configurations.

Not sure if this was a problem for anyone else but maybe worth considering merging.

oytal avatar Jun 08 '25 13:06 oytal