ansible-lockdown / RHEL8-STIG

Ansible role for Red Hat 8 STIG Baseline
https://ansible-lockdown.readthedocs.io
MIT License
99 stars 58 forks source link

Tasks contain duplicated and templated tags #296

Open qwestduck opened 2 months ago

qwestduck commented 2 months ago

Describe the Issue

Tasks contain duplicated and templated tags. Duplicated tags are a cosmetic nitpick that are easy to address while removing templated tags.

Templated tags are more problematic. Tags templated from role default vars have not worked since ansible-core 2.15 when using ANSIBLE_PRIVATE_ROLE_VARS=True. This is an issue that I am actively working on and further details are likely out of scope for this project.

It is easy enough to avoid templated tags entirely as a workaround since there is only one such tag: "{{ rhel8stig_firewall_service }}".

Expected Behavior

ANSIBLE_PRIVATE_ROLE_VARS=True ansible-playbook -i inventory site.yml succeeds.

Actual Behavior

ANSIBLE_PRIVATE_ROLE_VARS=True ansible-playbook -i inventory site.yml fails with an error similar to rhel8stig_firewall_service: undefined value.

Control(s) Affected

RHEL-08-040100

Environment

Additional Notes

This is likely the cause of #213 .

Possible Solution