diff --git a/tasks/prelim.yml b/tasks/prelim.yml index 381a6f3..ae55d62 100644 --- a/tasks/prelim.yml +++ b/tasks/prelim.yml @@ -32,7 +32,7 @@ # Current list is elastic and will be updated as we test more cloud based services. # Current testing is working in Azure using Hyper-V. We are currently using this for reference: # /~https://github.com/ansible/ansible/blob/905131fc76a07cf89dbc8d33e7a4910da3f10a16/lib/ansible/module_utils/facts/virtual/linux.py#L205 -- name: Set Fact If Cloud Based System. +- name: PRELIM | Set Fact If Cloud Based System. ansible.builtin.set_fact: win10cis_cloud_based_system: true when: @@ -42,7 +42,7 @@ tags: - always -- name: Check Hyper-V Installation +- name: PRELIM | Check Hyper-V Installation ansible.windows.win_shell: Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All | Select-Object -Property State | ft -hide changed_when: false failed_when: false @@ -56,13 +56,13 @@ tags: - always -- name: Set Windows installation type +- name: PRELIM | Set Windows installation type ansible.builtin.set_fact: win10cis_windows_installation_type: "{{ get_windows_installation_type.value | default('') }}" tags: - always -- name: Load Default User Hive (Account That All New Users Get Created From Profile) +- name: PRELIM | Load Default User Hive (Account That All New Users Get Created From Profile) ansible.windows.win_shell: REG LOAD HKU\DEFAULT C:\Users\Default\NTUSER.DAT changed_when: false failed_when: false @@ -70,7 +70,7 @@ tags: - always -- name: Pull All Username and SIDs +- name: PRELIM | Pull All Username and SIDs ansible.windows.win_shell: Get-CimInstance -Class Win32_UserAccount -Filter "SID LIKE 'S-1-5-%'" | ForEach-Object { $_.Name + " " + $_.SID } changed_when: false failed_when: false @@ -79,14 +79,14 @@ tags: - always -- name: Create Results List Fact For Username And SIDs +- name: PRELIM | Create Results List Fact For Username And SIDs ansible.builtin.set_fact: username_and_sid_results_list: "{{ all_users.stdout_lines | map('split', ' ') | list }}" when: win10cis_section19 tags: - always -- name: Load All User Hives From Username And SIDs List +- name: PRELIM | Load All User Hives From Username And SIDs List ansible.windows.win_shell: REG LOAD HKU\{{ item.1 }} C:\Users\{{ item.0 }}\NTUSER.DAT changed_when: false failed_when: false @@ -95,7 +95,7 @@ tags: - always -- name: Retrieve Current Users SIDs from HKEY_USERS +- name: PRELIM | Retrieve Current Users SIDs from HKEY_USERS ansible.windows.win_shell: (Get-ChildItem "REGISTRY::HKEY_USERS").name | Where-Object {$_ -notlike "*_classes"} changed_when: false failed_when: false @@ -104,7 +104,7 @@ tags: - always -- name: Create List Fact For Current Users SIDs from HKEY_USERS +- name: PRELIM | Create List Fact For Current Users SIDs from HKEY_USERS ansible.builtin.set_fact: hku_loaded_list: "{{ current_users_loaded_hku.stdout | regex_replace('HKEY_USERS\\\\','') | split }}" when: win10cis_section19