cis-ubuntu-ansible icon indicating copy to clipboard operation
cis-ubuntu-ansible copied to clipboard

Variable quoting required to meet stricter syntax in ansible 2.0

Open UTAS-Nick-Howden opened this issue 8 years ago • 2 comments

In file tasks/section_08_level2.yml

with_items: audit_lines_for_find.stdout_lines should be with_items: "{{ audit_lines_for_find.stdout_lines }}"

Without the extra quoting the generated file contains the line audit_lines_for_find.stdout_lines which is not the intended behaviour

Believe this is because of stricter syntax in Ansible 2.0

UTAS-Nick-Howden avatar Nov 21 '16 16:11 UTAS-Nick-Howden

Yes, nice catch. Do you mind creating the pull request to be sure that you have the correct fix?

awailly avatar Nov 22 '16 04:11 awailly

I've noticed several other variables and commands that should be quoted to follow best practices. I'll likely take on this work.

eastokes avatar Dec 21 '16 13:12 eastokes