automation-good-practices icon indicating copy to clipboard operation
automation-good-practices copied to clipboard

Include practice to use loop and loop_var

Open bontreger opened this issue 2 years ago • 3 comments

As per this ansible lint role, a recommendation to use loop and loop_var - https://ansible-lint.readthedocs.io/en/latest/default_rules/#no-loop-var-prefix

bontreger avatar Mar 18 '22 17:03 bontreger

Good point. I don't think we need a specific rule though, it should just be highlighted as a special case of the generic rule to prefix vars with the role's name.

ericzolf avatar Mar 22 '22 17:03 ericzolf

Do you create a PR for this?

ericzolf avatar Mar 22 '22 17:03 ericzolf

Not yet, I was brain-dumping as I was going through the ansible lint rules on a client's playbooks and this was a finding in lint that we haven't addressed

bontreger avatar Mar 22 '22 17:03 bontreger