Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRELIM | Check Hyper-V Installation in tasks/prelim.yml is necessary for different tasks -- Missing tags: always #16

Closed
davidstanaway opened this issue Dec 3, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@davidstanaway
Copy link

Describe the Issue
A clear and concise description of what the bug is.

When using tags to run subsets of the CIS rules for different targets, this prelim task is a necessary dependency for a number of different tasks and they fail with win10cis_hyper_v_installed being undefined.

Expected Behavior
A clear and concise description of what you expected to happen.

Like other tasks tasks/prelim.yml, this should have the always tag, and be evaluated when tags are used on this role.

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

When using tags, this role fails with win10cis_hyper_v_installed being undefined.

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

Environment (please complete the following information):

  • branch being used: [e.g. devel] head
  • Ansible Version: [e.g. 2.10]
  • Host Python Version: [e.g. Python 3.7.6]
  • Ansible Server Python Version: [e.g. Python 3.7.6]
  • Additional Details:

Additional Notes
Anything additional goes here

Possible Solution
Enter a suggested fix here

--- a/tasks/prelim.yml
+++ b/tasks/prelim.yml
@@ -47,6 +47,8 @@
changed_when: false
failed_when: false
register: win10cis_hyper_v_installed

  • tags:
  •  - always
    
  • name: PRELIM | Get Windows installation type
    ansible.windows.win_reg_stat:
@davidstanaway davidstanaway added the bug Something isn't working label Dec 3, 2024
@MrSteve81 MrSteve81 self-assigned this Feb 24, 2025
@MrSteve81
Copy link
Contributor

@davidstanaway This has been resolved in the latest release.
https://github.com/ansible-lockdown/Windows-10-CIS/releases/tag/2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants