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 #15

Open
davidstanaway opened this issue Dec 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@davidstanaway
Copy link

davidstanaway commented Dec 3, 2024

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 win11cis_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 win11cis_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] devel
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

diff --git a/tasks/prelim.yml b/tasks/prelim.yml
index 0033f44..770d54c 100644
--- a/tasks/prelim.yml
+++ b/tasks/prelim.yml
@@ -47,6 +47,8 @@
   changed_when: false
   failed_when: false
   register: win11cis_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
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

1 participant