ansible-lockdown / UBUNTU22-CIS-Audit

Audit for Ubuntu 22 CIS
MIT License
38 stars 15 forks source link

Incorrect templating for level1/2 vars #9

Closed zac90 closed 11 months ago

zac90 commented 1 year ago

A lot of sections for level2 server/workstation have no nested if structure to avoid templating them in if level 2. eg: {{ if .Vars.ubtu22cis_level_2 }}

There are too many to list but it causes the audit to say a number of tasks have failed because of it, when running the playbook at a level1-server standard.

I recommend going through each section and applying that if statement to any that are for level 2 only. The level 1 check by my understanding is implicit as a level 2 server needs to also be at a level 1 standard, so there shouldn't be any if statements for level 1, as all the tasks set at a level 1 standard will need to run either for level 1 or 2.