Skip to content

Commit 8a06eb7

Browse files
Merge pull request #24 from ccdc-opensource/general-fixes-and-improvements
General fixes and improvements
2 parents fe10550 + cedf3f3 commit 8a06eb7

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
# Generic info
3+
use_become: true
24
# Disable Telemetry
35
disable_telemetry_policy: true
46
disable_telemetry_dnsblock: true

tasks/disable_services.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
state: stopped
1111
start_mode: disabled
1212
when: service_info.exists
13-
become: true
13+
become: "{{ use_become | default(true) }}"

tasks/main.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
11
---
22
- name: Disable telemetry
33
ansible.builtin.include_tasks: disable_telemetry.yml
4-
4+
tags: telemetry
55
# We need to call this role in a loop externally as otherwise it will fail for
66
# any services that happen not to exist on the target system
77
- name: Disable unnecessary services
88
ansible.builtin.include_tasks: disable_services.yml
99
vars:
1010
service: "{{ item }}"
1111
with_items: "{{ disable_services }}"
12-
12+
tags: disable_services
1313
- name: Disable Windows Defender
1414
ansible.builtin.include_tasks: disable_windows_defender.yml
15+
tags: defender
1516
- name: Privacy hardening
1617
ansible.builtin.include_tasks: setup_privacy.yml
18+
tags: privacy
1719
- name: UI setup
1820
ansible.builtin.include_tasks: setup_ui.yml
21+
tags: ui
1922
- name: Set up Windows Update
2023
ansible.builtin.include_tasks: setup_windows_update.yml
24+
tags: updates
2125
- name: Remove default apps
2226
ansible.builtin.include_tasks: remove_default_apps.yml
27+
tags: default_apps
2328
- name: Remove OneDrive
2429
ansible.builtin.include_tasks: remove_onedrive.yml
30+
tags: onedrive
2531
- name: Disable Hibernation
2632
ansible.builtin.include_tasks: disable_hibernation.yml
33+
tags: hibernation

tasks/remove_onedrive.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
ansible.windows.win_shell: |
55
Stop-Process -Name "OneDrive" -Force
66
Stop-Process -Name "explorer" -Force
7+
ignore_errors: true
78

89
- name: Find OneDrive installer
910
when: remove_onedrive

tasks/setup_privacy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2-
32
- name: "Disable Windows Search web results"
43
when: disable_search_web_results
5-
ansible.windows.win_shell: Set-WindowsSearchSetting -EnableWebResultsSetting $false
4+
ansible.windows.win_powershell:
5+
script: |
6+
Set-WindowsSearchSetting -EnableWebResultsSetting $false
67
78
- name: Disable web language list access
89
when: disable_web_language_list_access

0 commit comments

Comments
 (0)