ansible-lockdown / Windows-2022-CIS

CIS Baseline Ansible Role for Windows 2022
MIT License
72 stars 31 forks source link

import_tasks section18.yml has wrong when statement #32

Open RomainPisters opened 8 months ago

RomainPisters commented 8 months ago

Describe the Issue The main tasks file Windows-2022-CIS/tasks/main.yml has import_tasks tasks and when statements for each CIS section. I noticed task related to importing section 18 tasks uses the when statement for section 17.

- name: Execute the section 18 tasks
  ansible.builtin.import_tasks:
      file: section18.yml
  when:
      - win22cis_section17
  tags:
      - section18

Expected Behavior When the variable win22cis_section18 is set to false, section18.yml shouldn't be included in the play.

Actual Behavior A clear and concise description of what's happening.

Control(s) Affected What controls are being affected by the issue

Environment (please complete the following information): Additional Notes Anything additional goes here

Possible Solution

- name: Execute the section 18 tasks
  ansible.builtin.import_tasks:
      file: section18.yml
  when:
      - win22cis_section18
  tags:
      - section18
frederickw082922 commented 8 months ago

Thank you @RomainPisters

Nice catch!

CC: @georgenalen , @MrSteve81

frederickw082922 commented 5 months ago

Fixed in PR #40