├── .ansible-lint ├── files └── logo.png ├── .gitignore ├── .yamllint.yml ├── inventory ├── requirements.yml ├── ansible.cfg ├── tasks ├── debloat.yml ├── hostname.yml ├── defrag.yml ├── mouse.yml ├── power_plan.yml ├── updates.yml ├── winget.yml ├── sounds.yml ├── windows_features.yml ├── remote_desktop.yml ├── desktop.yml ├── wsl2.yml ├── chocolatey.yml ├── storage.yml ├── ohmyposh.yml ├── start_menu.yml ├── taskbar.yml ├── fonts.yml └── explorer.yml ├── .github ├── workflows │ ├── lint.yml │ └── release.yaml ├── stale.yml └── ISSUE_TEMPLATE │ └── bug_report.md ├── LICENSE ├── .releaserc.json ├── CONTRIBUTING.md ├── setup.ps1 ├── default.config.yml ├── main.yml ├── CODE_OF_CONDUCT.md ├── CHANGELOG.md └── README.md /.ansible-lint: -------------------------------------------------------------------------------- 1 | --- 2 | skip_list: 3 | - package-latest 4 | -------------------------------------------------------------------------------- /files/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexNabokikh/windows-playbook/HEAD/files/logo.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.dll 3 | *.retry 4 | *.vagrant 5 | *.zip 6 | config.yml 7 | roles* 8 | hosts -------------------------------------------------------------------------------- /.yamllint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | extends: default 3 | rules: 4 | line-length: 5 | max: 180 6 | 7 | ignore: | 8 | /.github 9 | -------------------------------------------------------------------------------- /inventory: -------------------------------------------------------------------------------- 1 | [win] 2 | 127.0.0.1 ansible_connection=ssh ansible_shell_type=cmd ansible_user=Vagrant ansible_password=vagrant 3 | -------------------------------------------------------------------------------- /requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | collections: 3 | - name: ansible.windows 4 | - name: chocolatey.chocolatey 5 | - name: community.windows 6 | -------------------------------------------------------------------------------- /ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | become = true 3 | gather_facts = true 4 | host_key_checking = false 5 | inventory = inventory 6 | stdout_callback = yaml 7 | -------------------------------------------------------------------------------- /tasks/debloat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Remove bloatware. 3 | ansible.windows.win_package: 4 | product_id: "{{ item.name | default(item) }}" 5 | state: absent 6 | loop: "{{ bloatware }}" 7 | -------------------------------------------------------------------------------- /tasks/hostname.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set hostname. 3 | ansible.windows.win_hostname: 4 | name: "{{ custom_hostname }}" 5 | register: restart 6 | 7 | - name: Apply new hostname (Reboot). 8 | ansible.windows.win_reboot: 9 | when: restart.reboot_required 10 | -------------------------------------------------------------------------------- /tasks/defrag.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Run defragmentation on selected volumes (in parallel). 3 | community.windows.win_defrag: 4 | include_volumes: "{{ item.name | default('C') }}" 5 | parallel: true 6 | freespace_consolidation: true 7 | loop: "{{ include_volumes }}" 8 | -------------------------------------------------------------------------------- /tasks/mouse.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Disable mouse acceleration. 3 | ansible.windows.win_regedit: 4 | path: HKCU:\Control Panel\Mouse 5 | name: "{{ item }}" 6 | data: 0 7 | type: string 8 | loop: 9 | - MouseSpeed 10 | - MouseThreshold1 11 | - MouseThreshold2 12 | -------------------------------------------------------------------------------- /tasks/power_plan.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Set power plan to {{ power_plan }}" 3 | vars: 4 | plans: 5 | high_performance: "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" 6 | balanced: "381b4222-f694-41f0-9685-ff5bb260df2e" 7 | power_saver: "a1841308-3541-4fab-bc81-f71556f20b4a" 8 | community.windows.win_power_plan: 9 | guid: "{{ plans[power_plan] | default(balanced) }}" 10 | -------------------------------------------------------------------------------- /tasks/updates.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Check for missing updates. 3 | ansible.windows.win_updates: 4 | state: searched 5 | 6 | - name: Install Windows updates. 7 | ansible.windows.win_updates: 8 | category_names: "{{ update_categories | default(omit) }}" 9 | reboot: "{{ windows_updates_reboot | default(false) }}" 10 | register: update_result 11 | until: update_result.found_update_count == 0 12 | -------------------------------------------------------------------------------- /tasks/winget.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install winget packages. 3 | ansible.windows.win_powershell: 4 | script: | 5 | $app = "{{ item.name | default(item) }}" 6 | if ($(winget list $app) -like "*No installed package found*") { 7 | winget install --accept-package-agreements --accept-source-agreements -h -s "winget" $app 8 | } 9 | else { 10 | winget upgrade $app 11 | } 12 | loop: "{{ winget_packages }}" 13 | -------------------------------------------------------------------------------- /tasks/sounds.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set sound scheme to 'No sounds'. 3 | ansible.windows.win_powershell: 4 | script: | 5 | $Path = "HKCU:\AppEvents\Schemes" 6 | $Keyname = "(Default)" 7 | $SetValue = ".None" 8 | 9 | New-itemProperty -path $Path -Name $keyname -value $SetValue -force 10 | Get-ChildItem -Path "HKCU:\AppEvents\Schemes\Apps" | 11 | Get-ChildItem | 12 | Get-ChildItem | 13 | Where-Object { $_.PSChildName -eq ".Current" } | 14 | Set-ItemProperty -Name "(Default)" -Value "" 15 | -------------------------------------------------------------------------------- /tasks/windows_features.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Enable Windows optional features. 3 | ansible.windows.win_optional_feature: 4 | name: "{{ windows_feature.key }}" 5 | state: "{{ 'present' if windows_feature.value else 'absent' }}" 6 | include_parent: true 7 | loop: "{{ windows_features | dict2items }}" 8 | loop_control: 9 | loop_var: windows_feature 10 | register: feature_status 11 | 12 | - name: Reboot if Windows optional feature requires it. 13 | ansible.windows.win_reboot: 14 | when: item.reboot_required 15 | loop: "{{ feature_status.results }}" 16 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Lint 3 | 4 | on: 5 | pull_request: 6 | push: 7 | branches: 8 | - master 9 | 10 | jobs: 11 | lint: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Check out the codebase. 15 | uses: actions/checkout@v3 16 | - name: Set up Python 3. 17 | uses: actions/setup-python@v4 18 | with: 19 | python-version: "3.x" 20 | - name: Install test dependencies. 21 | run: pip3 install yamllint ansible-lint 22 | - name: Lint code. 23 | run: | 24 | yamllint . 25 | ansible-lint -x 403 26 | -------------------------------------------------------------------------------- /tasks/remote_desktop.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Configure Remote Desktop Services. 3 | ansible.windows.win_regedit: 4 | path: "{{ item }}" 5 | name: fDenyTSConnections 6 | data: 0x00000000 7 | type: dword 8 | state: "{{ 'present' if remote_desktop_enabled else 'absent' }}" 9 | loop: 10 | - "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\" 11 | - "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\Terminal Services" 12 | 13 | - name: Configure Firewall rules (RDS). 14 | ansible.windows.win_shell: > 15 | "{{ 'Enable-NetFirewallRule' if remote_desktop_enabled else 'Disable-NetFirewallRule' }} 16 | -DisplayGroup 'Remotedesktop'" 17 | -------------------------------------------------------------------------------- /tasks/desktop.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Get user profile path. 3 | ansible.windows.win_command: powershell.exe - 4 | args: 5 | stdin: echo $HOME 6 | register: user_home_path 7 | 8 | - name: Get shortcuts. 9 | ansible.windows.win_find: 10 | paths: 11 | - C:\Users\Public\Desktop 12 | - '{{ user_home_path.stdout | trim }}\Desktop' 13 | - '{{ user_home_path.stdout | trim }}\OneDrive\Desktop' 14 | patterns: "*.lnk" 15 | register: shortcuts 16 | 17 | - name: Remove shortcuts from the Desktop. 18 | ansible.windows.win_file: 19 | path: "{{ item.path }}" 20 | state: absent 21 | loop: "{{ shortcuts.files | unique }}" 22 | when: shortcuts.files | length > 0 23 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 60 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | # Label to use when marking an issue as stale 10 | staleLabel: wontfix 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false 18 | -------------------------------------------------------------------------------- /tasks/wsl2.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Enable Windows Subsystem for Linux. 3 | ansible.windows.win_optional_feature: 4 | name: 5 | - Microsoft-Windows-Subsystem-Linux 6 | - VirtualMachinePlatform 7 | state: present 8 | register: wsl_status 9 | 10 | - name: Restart the machine to complete the WSL install. 11 | ansible.windows.win_reboot: 12 | when: wsl_status.reboot_required 13 | 14 | - name: Install Linux kernel update package via the Chocolatey. 15 | chocolatey.chocolatey.win_chocolatey: 16 | name: wsl2 17 | ignore_checksums: true 18 | state: present 19 | 20 | - name: Install WSL2 distribution. 21 | chocolatey.chocolatey.win_chocolatey: 22 | name: "{{ wsl2_distribution }}" 23 | ignore_checksums: true 24 | state: present 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See an error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - Windows version: 28 | - Ansible version: 29 | 30 | **Additional context** 31 | Add any other context about the problem here. 32 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Release 3 | 4 | on: 5 | workflow_dispatch: 6 | push: 7 | branches: 8 | - main 9 | - master 10 | 11 | jobs: 12 | release: 13 | name: Release 14 | runs-on: ubuntu-latest 15 | # Skip running release workflow on forks 16 | if: github.repository_owner == 'AlexNabokikh' 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v3 20 | with: 21 | persist-credentials: false 22 | fetch-depth: 0 23 | 24 | - name: Release 25 | uses: cycjimmy/semantic-release-action@v3 26 | with: 27 | extra_plugins: | 28 | @semantic-release/changelog@6.0.3 29 | @semantic-release/git@10.0.1 30 | conventional-changelog-conventionalcommits@5.0.0 31 | env: 32 | GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} 33 | -------------------------------------------------------------------------------- /tasks/chocolatey.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install Chocolatey packages. 3 | chocolatey.chocolatey.win_chocolatey: 4 | name: "{{ item.name | default(item) }}" 5 | state: "{{ item.state | default('present') }}" 6 | version: "{{ item.version | default(omit) }}" 7 | choco_args: "{{ item.choco_args | default(omit) }}" 8 | loop: "{{ choco_installed_packages }}" 9 | 10 | - name: Clean chocolatey and nuget cache. 11 | block: 12 | - name: Clean up the chocolatey and NuGet cache. 13 | ansible.windows.win_file: 14 | path: "{{ item }}" 15 | state: absent 16 | loop: 17 | - '%UserProfile%\AppData\Local\Temp\chocolatey\' 18 | - '%UserProfile%\AppData\Local\Temp\nuget\' 19 | - '%UserProfile%\AppData\Local\NuGet\Cache\' 20 | register: cleanup_task 21 | rescue: 22 | - name: "{{ cleanup_task.msg }}" 23 | ansible.builtin.debug: 24 | msg: > 25 | "Some chocolatey cache files are still in use. You may need to reboot your machine to resolve the error" 26 | -------------------------------------------------------------------------------- /tasks/storage.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set Storage Sense configuration. 3 | ansible.windows.win_regedit: 4 | path: HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy 5 | name: "{{ item.name }}" 6 | value: "{{ item.value }}" 7 | type: dword 8 | state: present 9 | loop: 10 | - {name: "01", value: "{{ storage_sense.enabled | ternary(1, 0) }}"} 11 | - {name: "2048", value: "{{ storage_sense.run_frequency }}"} 12 | - {name: "04", value: "{{ storage_sense.delete_unused_files | ternary(0, 1) }}"} 13 | - {name: "08", value: "{{ storage_sense.delete_recycle_bin_files | ternary(1, 0) }}"} 14 | - {name: "256", value: "{{ storage_sense.recycle_bin_age }}"} 15 | - {name: "32", value: "{{ storage_sense.delete_downloads_files | ternary(1, 0) }}"} 16 | - {name: "512", value: "{{ storage_sense.downloads_age }}"} 17 | when: 18 | - storage_sense.run_frequency in [1, 7, 30] 19 | - storage_sense.recycle_bin_age in [1, 14, 30, 60] 20 | - storage_sense.downloads_age in [1, 14, 30, 60] 21 | -------------------------------------------------------------------------------- /tasks/ohmyposh.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install oh-my-posh via the chocolatey. 3 | chocolatey.chocolatey.win_chocolatey: 4 | name: oh-my-posh 5 | 6 | - name: Get PowerShell profile path. 7 | ansible.windows.win_command: powershell.exe - 8 | args: 9 | stdin: echo $PROFILE 10 | register: powershell_profile_path 11 | 12 | - name: Check if PowerShell directory exists. 13 | ansible.windows.win_file: 14 | path: "{{ powershell_profile_path.stdout.split(separator)[:-1] | join(separator) }}" 15 | state: directory 16 | vars: 17 | separator: '\' 18 | 19 | - name: Check if PowerShell profile exists. 20 | ansible.windows.win_file: 21 | path: "{{ powershell_profile_path.stdout | trim }}" 22 | state: touch 23 | 24 | - name: Set oh-my-posh as a default PowerShell profile. 25 | community.windows.win_lineinfile: 26 | path: "{{ powershell_profile_path.stdout | trim }}" 27 | insertbefore: BOF 28 | create: true 29 | regex: "^oh-my-posh" 30 | line: "oh-my-posh --init --shell pwsh --config $env:POSH_THEMES_PATH/'{{ ohmyposh_theme | default('paradox') }}'.omp.json | Invoke-Expression" 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Alexander Nabokikh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tasks/start_menu.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Disable Automatic Install of Suggested Apps. 3 | ansible.windows.win_regedit: 4 | path: HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager 5 | name: SilentInstalledAppsEnabled 6 | data: 0 7 | type: dword 8 | 9 | - name: Disable App Suggestions in Start menu. 10 | ansible.windows.win_regedit: 11 | path: HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager 12 | name: SystemPaneSuggestionsEnabled 13 | data: 0 14 | type: dword 15 | 16 | - name: Disable popup "tips" about Windows. 17 | ansible.windows.win_regedit: 18 | path: HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager 19 | name: SoftLandingEnabled 20 | data: 0 21 | type: dword 22 | 23 | - name: Disable 'Windows Welcome Experience'. 24 | ansible.windows.win_regedit: 25 | path: HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager 26 | name: "{{ item }}" 27 | data: 0 28 | type: dword 29 | loop: 30 | - SubscribedContent-310093Enabled 31 | - SubscribedContent-338388Enabled 32 | - SubscribedContent-338389Enabled 33 | - SubscribedContent-88000326Enabled 34 | -------------------------------------------------------------------------------- /tasks/taskbar.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Unpin 'Search' from Taskbar. 3 | ansible.windows.win_regedit: 4 | path: HKCU:\Software\Microsoft\Windows\CurrentVersion\Search 5 | name: SearchboxTaskbarMode 6 | data: 0 7 | type: dword 8 | 9 | - name: Unpin Task View, Chat and Cortana from Taskbar. 10 | ansible.windows.win_regedit: 11 | path: HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced 12 | name: "{{ item }}" 13 | data: 0 14 | type: dword 15 | loop: 16 | - ShowCortanaButton 17 | - ShowTaskViewButton 18 | - TaskbarDa 19 | - TaskbarMn 20 | 21 | - name: Unpin 'News and Interests' from Taskbar. 22 | ansible.windows.win_regedit: 23 | path: HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds 24 | name: EnableFeeds 25 | data: 0 26 | type: dword 27 | state: present 28 | 29 | - name: Unpin 'People' from Taskbar. 30 | ansible.windows.win_regedit: 31 | path: HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People 32 | name: PeopleBand 33 | data: 0 34 | type: dword 35 | 36 | - name: Unpin 'Edge', 'Store' other built-in shortcuts from Taskbar. 37 | ansible.windows.win_regedit: 38 | path: HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband 39 | name: Favorites 40 | state: absent 41 | -------------------------------------------------------------------------------- /.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "branches": [ 3 | "main", 4 | "master" 5 | ], 6 | "ci": false, 7 | "plugins": [ 8 | [ 9 | "@semantic-release/commit-analyzer", 10 | { 11 | "preset": "conventionalcommits" 12 | } 13 | ], 14 | [ 15 | "@semantic-release/release-notes-generator", 16 | { 17 | "preset": "conventionalcommits" 18 | } 19 | ], 20 | [ 21 | "@semantic-release/github", 22 | { 23 | "successComment": "This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:", 24 | "labels": false, 25 | "releasedLabels": false 26 | } 27 | ], 28 | [ 29 | "@semantic-release/changelog", 30 | { 31 | "changelogFile": "CHANGELOG.md", 32 | "changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file." 33 | } 34 | ], 35 | [ 36 | "@semantic-release/git", 37 | { 38 | "assets": [ 39 | "CHANGELOG.md" 40 | ], 41 | "message": "chore(release): version ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 42 | } 43 | ] 44 | ] 45 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to the windows-playbook 2 | 3 | Want to contribute? Great! First, read this page. 4 | 5 | ## How to become a contributor 6 | 7 | - Direct contributions 8 | - **Create pull requests directly.** 9 | - Please send e-mails to nabokikh@duck.com if you have any questions. 10 | - Feedback suggestions and bugs. 11 | - We use GitHub issues to track bugs and features. 12 | - For bugs and general issues please [file a new issue](https://github.com/AlexNabokikh/windows-playbook/issues/new). 13 | 14 | ## Code contribution guidelines 15 | 16 | ### Conventional commits 17 | 18 | - Use [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/#summary) message syntax for repo auto-tagging and releasing via pipeline. 19 | 20 | ### Code style and conventions 21 | 22 | - Use [Ansible lint](https://github.com/ansible/ansible-lint) and [YAML lint](https://github.com/adrienverge/yamllint) to check code style. 23 | - Respect the `.ansible-lint` and `.yamllint.yml` files specified in the source tree. 24 | 25 | ### Fix wrong commit 26 | 27 | In case you have an issue with your commit it is possible to fix it with `git commit --amend`. 28 | 29 | In case the errored commit is not the last one it is possible to fix it with the following procedure: 30 | 31 | ```shell 32 | git rebase --interactive 'bbc643cd^' 33 | ``` 34 | 35 | Please note the caret `^` at the end of the command, because you need actually to rebase back to the commit before the one you wish to modify. 36 | 37 | In the default editor, modify `pick` to `edit` in the line mentioning `'bbc643cd'`. 38 | 39 | Save the file and exit: git will interpret and automatically execute the commands in the file. You will find yourself in the previous situation in which you just had created commit `bbc643cd`. 40 | 41 | At this point, `bbc643cd` is your last commit and you can easily amend it to change the text with the command: 42 | 43 | ```shell 44 | git commit --all --amend 45 | git rebase --continue 46 | ``` 47 | -------------------------------------------------------------------------------- /tasks/fonts.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Find latest Nerd Fonts release 3 | ansible.windows.win_uri: 4 | url: https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest 5 | return_content: true 6 | register: nerdfonts_release 7 | 8 | - name: Get font download URLs 9 | ansible.builtin.set_fact: 10 | font_dl_urls: > 11 | {{ 12 | font_dl_urls | default([]) + nerdfonts_release.json.assets | 13 | selectattr('name', 'equalto', item ~ '.zip') 14 | }} 15 | loop: "{{ installed_nerdfonts }}" 16 | 17 | - name: Download fonts 18 | ansible.windows.win_get_url: 19 | url: "{{ item.browser_download_url }}" 20 | dest: '{{ ansible_env["TEMP"] }}\{{ item.name }}' 21 | loop: "{{ font_dl_urls }}" 22 | throttle: 1 23 | loop_control: 24 | label: "{{ item.name }}" 25 | 26 | - name: Extract fonts 27 | community.windows.win_unzip: 28 | src: '{{ ansible_env["TEMP"] }}\{{ item.name }}' 29 | dest: '{{ ansible_env["TEMP"] }}\{{ item.name }}-unzip' 30 | creates: '{{ ansible_env["TEMP"] }}\{{ item.name }}-unzip' 31 | loop: "{{ font_dl_urls }}" 32 | loop_control: 33 | label: "{{ item.name }}" 34 | 35 | - name: Find font files in extracted archive 36 | ansible.windows.win_find: 37 | paths: '{{ ansible_env["TEMP"] }}\{{ item.name }}-unzip' 38 | patterns: ["*.ttf"] 39 | loop: "{{ font_dl_urls }}" 40 | register: font_files 41 | loop_control: 42 | label: "{{ item.name }}" 43 | 44 | - name: Install fonts 45 | ansible.windows.win_shell: | 46 | $FontsFolder = (New-Object -ComObject Shell.Application).Namespace(0x14) 47 | $JoinPathArgs = @{ 48 | 'Path' = "${env:LocalAppData}\Microsoft\Windows\Fonts" 49 | 'ChildPath' = '{{ item.filename }}' 50 | } 51 | $targetPath = Join-Path @JoinPathArgs 52 | # So, see if target exists... 53 | if (-not (Test-Path $targetPath)) { 54 | # Install the font. 55 | $FontsFolder.CopyHere('{{ item.path }}') 56 | Write-Output "change made" 57 | } 58 | register: _fontinstall_command 59 | changed_when: '"change made" in _fontinstall_command.stdout' 60 | loop: '{{ font_files.results | map(attribute="files") | flatten }}' 61 | loop_control: 62 | label: "{{ item.filename }}" 63 | -------------------------------------------------------------------------------- /setup.ps1: -------------------------------------------------------------------------------- 1 | # Set PowerShell execution policy to RemoteSigned for the current user 2 | $ExecutionPolicy = Get-ExecutionPolicy -Scope CurrentUser 3 | if ($ExecutionPolicy -eq "RemoteSigned") { 4 | Write-Verbose "Execution policy is already set to RemoteSigned for the current user, skipping..." -Verbose 5 | } 6 | else { 7 | Write-Verbose "Setting execution policy to RemoteSigned for the current user..." -Verbose 8 | Set-ExecutionPolicy -Scope CurrentUser RemoteSigned 9 | } 10 | 11 | # Install chocolatey 12 | if ([bool](Get-Command -Name 'choco' -ErrorAction SilentlyContinue)) { 13 | Write-Verbose "Chocolatey is already installed, skip installation." -Verbose 14 | } 15 | else { 16 | Write-Verbose "Installing Chocolatey..." -Verbose 17 | Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) 18 | } 19 | 20 | # Install OpenSSH Server 21 | if ([bool](Get-Service -Name sshd -ErrorAction SilentlyContinue)) { 22 | Write-Verbose "OpenSSH is already installed, skip installation." -Verbose 23 | } 24 | else { 25 | Write-Verbose "Installing OpenSSH..." -Verbose 26 | $openSSHpackages = Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH.Server*' | Select-Object -ExpandProperty Name 27 | 28 | foreach ($package in $openSSHpackages) { 29 | Add-WindowsCapability -Online -Name $package 30 | } 31 | 32 | # Start the sshd service 33 | Write-Verbose "Starting OpenSSH service..." -Verbose 34 | Start-Service sshd 35 | Set-Service -Name sshd -StartupType 'Automatic' 36 | 37 | # Confirm the Firewall rule is configured. It should be created automatically by setup. Run the following to verify 38 | Write-Verbose "Confirm the Firewall rule is configured..." -Verbose 39 | if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue | Select-Object Name, Enabled)) { 40 | Write-Output "Firewall Rule 'OpenSSH-Server-In-TCP' does not exist, creating it..." 41 | New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 42 | } 43 | else { 44 | Write-Output "Firewall rule 'OpenSSH-Server-In-TCP' has been created and exists." 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /tasks/explorer.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set Explorer's default layout and view to 'List'. 3 | ansible.windows.win_regedit: 4 | path: > 5 | HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults 6 | name: "{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}" 7 | data: > 8 | hex:1c,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, 9 | 00,00,00,00,00,f1,f1,f1,f1,14,00,00,00,00,00,00,00,00,00,00,00,00,00,00, 10 | 00,e8,02,00,00,e4,02,00,00,31,53,50,53,05,d5,cd,d5,9c,2e,1b,10,93,97,08, 11 | 00,2b,2c,f9,ae,83,00,00,00,22,00,00,00,00,47,00,72,00,6f,00,75,00,70,00, 12 | 42,00,79,00,4b,00,65,00,79,00,3a,00,46,00,4d,00,54,00,49,00,44,00,00,00, 13 | 08,00,00,00,4e,00,00,00,7b,00,30,00,30,00,30,00,30,00,30,00,30,00,30,00, 14 | 30,00,2d,00,30,00,30,00,30,00,30,00,2d,00,30,00,30,00,30,00,30,00,2d,00, 15 | 30,00,30,00,30,00,30,00,2d,00,30,00,30,00,30,00,30,00,30,00,30,00,30,00, 16 | 30,00,30,00,30,00,30,00,30,00,7d,00,00,00,00,00,33,00,00,00,22,00,00,00, 17 | 00,47,00,72,00,6f,00,75,00,70,00,42,00,79,00,44,00,69,00,72,00,65,00,63, 18 | 00,74,00,69,00,6f,00,6e,00,00,00,13,00,00,00,01,00,00,00,73,00,00,00,0a, 19 | 00,00,00,00,53,00,6f,00,72,00,74,00,00,00,42,00,00,00,1e,00,00,00,70,00, 20 | 72,00,6f,00,70,00,34,00,32,00,39,00,34,00,39,00,36,00,37,00,32,00,39,00, 21 | 35,00,00,00,00,00,34,00,00,00,02,00,00,00,30,f1,25,b7,ef,47,1a,10,a5,f1, 22 | 02,60,8c,9e,eb,ac,04,00,00,00,01,00,00,00,30,f1,25,b7,ef,47,1a,10,a5,f1, 23 | 02,60,8c,9e,eb,ac,0a,00,00,00,01,00,00,00,25,00,00,00,14,00,00,00,00,47, 24 | 00,72,00,6f,00,75,00,70,00,56,00,69,00,65,00,77,00,00,00,0b,00,00,00,00, 25 | 00,00,00,1b,00,00,00,0a,00,00,00,00,4d,00,6f,00,64,00,65,00,00,00,13,00, 26 | 00,00,03,00,00,00,23,00,00,00,12,00,00,00,00,49,00,63,00,6f,00,6e,00,53, 27 | 00,69,00,7a,00,65,00,00,00,13,00,00,00,10,00,00,00,bd,00,00,00,10,00,00, 28 | 00,00,43,00,6f,00,6c,00,49,00,6e,00,66,00,6f,00,00,00,42,00,00,00,1e,00, 29 | 00,00,70,00,72,00,6f,00,70,00,34,00,32,00,39,00,34,00,39,00,36,00,37,00, 30 | 32,00,39,00,35,00,00,00,00,00,78,00,00,00,fd,df,df,fd,10,00,00,00,00,00, 31 | 00,00,00,00,00,00,04,00,00,00,18,00,00,00,30,f1,25,b7,ef,47,1a,10,a5,f1, 32 | 02,60,8c,9e,eb,ac,0a,00,00,00,10,01,00,00,30,f1,25,b7,ef,47,1a,10,a5,f1, 33 | 02,60,8c,9e,eb,ac,0e,00,00,00,90,00,00,00,30,f1,25,b7,ef,47,1a,10,a5,f1, 34 | 02,60,8c,9e,eb,ac,04,00,00,00,78,00,00,00,30,f1,25,b7,ef,47,1a,10,a5,f1, 35 | 02,60,8c,9e,eb,ac,0c,00,00,00,50,00,00,00,2f,00,00,00,1e,00,00,00,00,47, 36 | 00,72,00,6f,00,75,00,70,00,42,00,79,00,4b,00,65,00,79,00,3a,00,50,00,49, 37 | 00,44,00,00,00,13,00,00,00,00,00,00,00,1f,00,00,00,0e,00,00,00,00,46,00, 38 | 46,00,6c,00,61,00,67,00,73,00,00,00,13,00,00,00,01,00,20,41,31,00,00,00, 39 | 20,00,00,00,00,4c,00,6f,00,67,00,69,00,63,00,61,00,6c,00,56,00,69,00,65, 40 | 00,77,00,4d,00,6f,00,64,00,65,00,00,00,13,00,00,00,04,00,00,00,00,00,00, 41 | 00,00,00,00,00 42 | type: binary 43 | 44 | - name: Enable the file extension in file names. 45 | ansible.windows.win_regedit: 46 | path: HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced 47 | name: HideFileExt 48 | data: 0 49 | type: dword 50 | 51 | - name: Set Explorer to the Computer view. 52 | ansible.windows.win_regedit: 53 | path: HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced 54 | name: LaunchTo 55 | data: 1 56 | type: dword 57 | 58 | - name: Disable Ribbon menu in Windows Explorer. 59 | ansible.windows.win_regedit: 60 | path: HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Ribbon 61 | name: MinimizedStateTabletModeOff 62 | data: 1 63 | type: dword 64 | 65 | - name: Enable Right-click Context Menu. 66 | ansible.windows.win_regedit: 67 | path: > 68 | HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32 69 | data: "" 70 | type: none 71 | -------------------------------------------------------------------------------- /default.config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | configure_explorer: true 3 | configure_hostname: false 4 | custom_hostname: windows-ansible 5 | configure_start_menu: true 6 | configure_taskbar: true 7 | disable_mouse_acceleration: true 8 | remote_desktop_enabled: true 9 | remove_desktop_icons: false 10 | set_sound_scheme: true 11 | 12 | install_windows_updates: true 13 | windows_updates_reboot: true 14 | update_categories: 15 | # You can install only specific updates by uncommenting it 16 | # * - installs all updates 17 | # - "*" 18 | - Critical Updates 19 | # - Definition Updates 20 | # - Developer Kits 21 | # - Feature Packs 22 | - Security Updates 23 | # - Service Packs 24 | # - Tools 25 | - Update Rollups 26 | # - Updates 27 | # - Upgrades 28 | 29 | change_power_plan: true 30 | # high_performance 31 | # balanced 32 | # power_saver 33 | power_plan: "high_performance" 34 | 35 | install_chocolatey_packages: true 36 | choco_installed_packages: 37 | # installs 2019.2.2.20191 version of the adobe reader 38 | - name: adobereader 39 | version: "2022.002.20191" 40 | # installs latest version of the Firefox while ignoring the package checksum 41 | - name: Firefox 42 | state: latest 43 | choco_args: --ignorechecksum 44 | # installs awscli, but won't update it 45 | - awscli 46 | - Firefox 47 | - git 48 | - golang 49 | - jre8 50 | - kubernetes-cli 51 | - microsoft-windows-terminal 52 | - peazip 53 | - powertoys 54 | - python3 55 | - sharex 56 | - telegram 57 | - terraform 58 | - vlc 59 | - vscode 60 | - zoom 61 | 62 | install_winget_packages: true 63 | winget_packages: 64 | # - name: "Auto Dark Mode" 65 | # source: winget 66 | - name: WinDynamicDesktop 67 | source: winget 68 | 69 | install_fonts: true 70 | installed_nerdfonts: 71 | - FiraCode 72 | - FantasqueSansMono 73 | 74 | install_ohmyposh: true 75 | 76 | # List of features: "Get-WindowsOptionalFeature -Online" 77 | install_windows_features: false 78 | windows_features: 79 | Microsoft-Hyper-V: true 80 | 81 | # List of valid distributions that can be installed: 82 | # wsl-alpine 83 | # wsl-archlinux 84 | # wsl-debiangnulinux 85 | # wsl-fedoraremix 86 | # wsl-kalilinux 87 | # wsl-opensuse 88 | # wsl-sles 89 | # wsl-ubuntu-1604 90 | # wsl-ubuntu-1804 91 | # wsl-ubuntu-2004 92 | install_wsl2: true 93 | wsl2_distribution: wsl-ubuntu-2004 94 | 95 | remove_bloatware: true 96 | bloatware: 97 | - Microsoft.BingNews 98 | - Microsoft.BingWeather 99 | - Microsoft.GamingApp 100 | - Microsoft.GetHelp 101 | - Microsoft.Getstarted 102 | # - Microsoft.Messaging 103 | - Microsoft.Microsoft3DViewer 104 | - Microsoft.MicrosoftOfficeHub 105 | - Microsoft.MicrosoftSolitaireCollection 106 | - Microsoft.MicrosoftStickyNotes 107 | - Microsoft.MixedReality.Portal 108 | # - Microsoft.MSPaint 109 | - Microsoft.Office.OneNote 110 | - Microsoft.OneConnect 111 | - Microsoft.People 112 | - Microsoft.PowerAutomateDesktop 113 | - Microsoft.Print3D 114 | - Microsoft.ScreenSketch 115 | - Microsoft.SkypeApp 116 | - Microsoft.Todos 117 | - Microsoft.Windows.Photos 118 | - Microsoft.WindowsAlarms 119 | # - Microsoft.WindowsCalculator 120 | - Microsoft.Wallet 121 | - Microsoft.WindowsCamera 122 | # - microsoft.windowscommunicationsapps 123 | - Microsoft.WindowsFeedbackHub 124 | - Microsoft.WindowsMaps 125 | - Microsoft.WindowsSoundRecorder 126 | - Microsoft.Xbox 127 | - Microsoft.Xbox.TCUI 128 | - Microsoft.XboxApp 129 | - Microsoft.XboxGameOverlay 130 | - Microsoft.XboxSpeechToTextOverlay 131 | # - Microsoft.YourPhone 132 | - Microsoft.ZuneMusic 133 | - Microsoft.ZuneVideo 134 | - MicrosoftTeams 135 | 136 | configure_storage_sense: true 137 | storage_sense: 138 | enabled: true 139 | run_frequency: 1 140 | delete_unused_files: true 141 | delete_recycle_bin_files: true 142 | recycle_bin_age: 14 143 | delete_downloads_files: true 144 | downloads_age: 14 145 | 146 | defrag_volumes: true 147 | include_volumes: 148 | - C 149 | -------------------------------------------------------------------------------- /main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Windows Playbook 3 | hosts: all 4 | 5 | vars_files: 6 | - default.config.yml 7 | 8 | pre_tasks: 9 | - name: Include playbook user configuration. 10 | ansible.builtin.include_vars: "{{ item }}" 11 | with_fileglob: 12 | - "{{ playbook_dir }}/config.yml" 13 | tags: ["always"] 14 | 15 | tasks: 16 | - name: Include hostname configuration. 17 | ansible.builtin.import_tasks: 18 | file: tasks/hostname.yml 19 | when: configure_hostname 20 | tags: ["hostname"] 21 | 22 | - name: Include windows updates configuration. 23 | ansible.builtin.import_tasks: 24 | file: tasks/updates.yml 25 | when: install_windows_updates 26 | tags: ["updates"] 27 | 28 | - name: Include debloat configuration. 29 | ansible.builtin.import_tasks: 30 | file: tasks/debloat.yml 31 | when: remove_bloatware 32 | tags: ["debloat"] 33 | 34 | - name: Include chocolatey configuration. 35 | ansible.builtin.import_tasks: 36 | file: tasks/chocolatey.yml 37 | when: install_chocolatey_packages 38 | tags: ["choco"] 39 | 40 | - name: Include winget configuration. 41 | ansible.builtin.import_tasks: 42 | file: tasks/winget.yml 43 | when: install_winget_packages 44 | tags: ["winget"] 45 | 46 | - name: Include windows features configuration. 47 | ansible.builtin.import_tasks: 48 | file: tasks/windows_features.yml 49 | when: install_windows_features 50 | tags: ["windows_features"] 51 | 52 | - name: Include wsl2 configuration. 53 | ansible.builtin.import_tasks: 54 | file: tasks/wsl2.yml 55 | when: install_wsl2 56 | tags: ["wsl"] 57 | 58 | - name: Include fonts configuration. 59 | ansible.builtin.import_tasks: 60 | file: tasks/fonts.yml 61 | when: install_fonts 62 | tags: ["fonts"] 63 | 64 | - name: Include ohmyposh configuration. 65 | ansible.builtin.import_tasks: 66 | file: tasks/ohmyposh.yml 67 | when: install_ohmyposh 68 | tags: ["ohmyposh"] 69 | 70 | - name: Include explorer configuration. 71 | ansible.builtin.import_tasks: 72 | file: tasks/explorer.yml 73 | when: configure_explorer 74 | tags: ["explorer"] 75 | 76 | - name: Include taskbar configuration. 77 | ansible.builtin.import_tasks: 78 | file: tasks/taskbar.yml 79 | when: configure_taskbar 80 | tags: ["taskbar"] 81 | 82 | - name: Include start menu configuration. 83 | ansible.builtin.import_tasks: 84 | file: tasks/start_menu.yml 85 | when: configure_start_menu 86 | tags: ["start_menu"] 87 | 88 | - name: Include sounds configuration. 89 | ansible.builtin.import_tasks: 90 | file: tasks/sounds.yml 91 | when: set_sound_scheme 92 | tags: ["sounds"] 93 | 94 | - name: Include mouse configuration. 95 | ansible.builtin.import_tasks: 96 | file: tasks/mouse.yml 97 | when: disable_mouse_acceleration 98 | tags: ["mouse"] 99 | 100 | - name: Include power plan configuration. 101 | ansible.builtin.import_tasks: 102 | file: tasks/power_plan.yml 103 | when: change_power_plan 104 | tags: ["power"] 105 | 106 | - name: Include remote desktop configuration. 107 | ansible.builtin.import_tasks: 108 | file: tasks/remote_desktop.yml 109 | when: remote_desktop_enabled 110 | tags: ["remote_desktop"] 111 | 112 | - name: Include desktop configuration. 113 | ansible.builtin.import_tasks: 114 | file: tasks/desktop.yml 115 | when: remove_desktop_icons 116 | tags: ["desktop"] 117 | 118 | - name: Include storage sense configuration. 119 | ansible.builtin.import_tasks: 120 | file: tasks/storage.yml 121 | when: configure_storage_sense 122 | tags: ["storage_sense"] 123 | 124 | - name: Include defrag configuration. 125 | ansible.builtin.import_tasks: 126 | file: tasks/defrag.yml 127 | when: defrag_volumes 128 | tags: ["defrag"] 129 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | - Demonstrating empathy and kindness toward other people 21 | - Being respectful of differing opinions, viewpoints, and experiences 22 | - Giving and gracefully accepting constructive feedback 23 | - Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | - Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | - The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | - Trolling, insulting or derogatory comments, and personal or political attacks 33 | - Public or private harassment 34 | - Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | - Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | nabokikh@duck.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [2.0.1](https://github.com/AlexNabokikh/windows-playbook/compare/v2.0.0...v2.0.1) (2023-04-01) 6 | 7 | 8 | ### Bug Fixes 9 | 10 | * **storage_sense:** fixed incorrect when conditions ([03e518f](https://github.com/AlexNabokikh/windows-playbook/commit/03e518f9511c1534754c6d8b933f3fedc6d93f33)) 11 | 12 | ## [2.0.0](https://github.com/AlexNabokikh/windows-playbook/compare/v1.15.0...v2.0.0) (2023-03-31) 13 | 14 | 15 | ### ⚠ BREAKING CHANGES 16 | 17 | * **main.yml:** chocolatey and winget packages installation are now 18 | optional. Please make changes in your configs accordingly. 19 | 20 | ### Features 21 | 22 | * **storage:** added a task that enables storage sense ([cd9d5b1](https://github.com/AlexNabokikh/windows-playbook/commit/cd9d5b1592b617c663eb2093a5453edcbc55e969)) 23 | 24 | 25 | ### Bug Fixes 26 | 27 | * **deps:** bumped pipeline dependecies ([0b46840](https://github.com/AlexNabokikh/windows-playbook/commit/0b46840e6e33ae8ae2199eadb794cba2aa2eaa06)) 28 | * **remote_desktop:** forbidden implicit octal value ([edcfc54](https://github.com/AlexNabokikh/windows-playbook/commit/edcfc54e367558f4a917ba2ccf7b8766ab972a58)) 29 | * **storage:** too many spaces inside braces ([9dd1d15](https://github.com/AlexNabokikh/windows-playbook/commit/9dd1d15de3b5b47cc837c9b0581fda697b303f1e)) 30 | 31 | 32 | ### Miscellaneous Chores 33 | 34 | * **main.yml:** revorked playbook entrypoint ([f833db7](https://github.com/AlexNabokikh/windows-playbook/commit/f833db70a231cf4d04ed7cfd2819448a58af9b33)) 35 | 36 | ## [1.15.0](https://github.com/AlexNabokikh/windows-playbook/compare/v1.14.1...v1.15.0) (2022-12-12) 37 | 38 | 39 | ### Features 40 | 41 | * change task names wording ([99a3dce](https://github.com/AlexNabokikh/windows-playbook/commit/99a3dceaca22dc2960ffc3a136ede86dcf74a087)) 42 | * **power_plan:** ensure the plan set correctly even if system language is not english ([10a36cb](https://github.com/AlexNabokikh/windows-playbook/commit/10a36cb857b18da47a6d1d031b32e2f809bdaae1)) 43 | * **winget:** introduced winget package installation task ([098186c](https://github.com/AlexNabokikh/windows-playbook/commit/098186c1e89e257a3fc59ca867942257e742a07b)) 44 | 45 | 46 | ### Bug Fixes 47 | 48 | * **license:** fixed license date ([bf4e847](https://github.com/AlexNabokikh/windows-playbook/commit/bf4e847ba26a943266d958965057feee992a2cb0)) 49 | 50 | ## [1.14.1](https://github.com/AlexNabokikh/windows-playbook/compare/v1.14.0...v1.14.1) (2022-12-11) 51 | 52 | 53 | ### Bug Fixes 54 | 55 | * **wsl2:** fixed task name ([1fc7ce1](https://github.com/AlexNabokikh/windows-playbook/commit/1fc7ce1558708bed417bed1c1071a2326395a8d5)) 56 | 57 | ## [1.14.0](https://github.com/AlexNabokikh/windows-playbook/compare/v1.13.1...v1.14.0) (2022-09-03) 58 | 59 | 60 | ### Features 61 | 62 | * **default.config:** adjusted the default config with more sane parameters ([e390c50](https://github.com/AlexNabokikh/windows-playbook/commit/e390c50192d13a0a47f5be24dc87546ee0de7e74)) 63 | 64 | 65 | ### Bug Fixes 66 | 67 | * **main:** added missed when parameter for the remote desktop task ([34ef92f](https://github.com/AlexNabokikh/windows-playbook/commit/34ef92f13eb15ac128eb32189de740b3536b327c)) 68 | 69 | ### [1.13.1](https://github.com/AlexNabokikh/windows-playbook/compare/v1.13.0...v1.13.1) (2022-08-21) 70 | 71 | 72 | ### Bug Fixes 73 | 74 | * **chocolatey:** allow the cache cleaner task to continue if the cache is busy ([fe78ccc](https://github.com/AlexNabokikh/windows-playbook/commit/fe78ccc221d4bb11435a8edb984e3d16e726edb7)) 75 | 76 | ## [1.13.0](https://github.com/AlexNabokikh/windows-playbook/compare/v1.12.0...v1.13.0) (2022-08-15) 77 | 78 | 79 | ### Features 80 | 81 | * **explorer.yml:** reformated task's code ([f79f1e6](https://github.com/AlexNabokikh/windows-playbook/commit/f79f1e6c50d9bdabf6f615ffe15a5976c458b85b)) 82 | * **power_plan:** added default value for power_plan ([e9b537a](https://github.com/AlexNabokikh/windows-playbook/commit/e9b537adca33e69321d29cc3a4939d5075029c70)) 83 | * **setup.ps1:** added powershell execution policy setup step ([812a485](https://github.com/AlexNabokikh/windows-playbook/commit/812a485d78ad5d0e294e53d43c3bc16878528bde)) 84 | 85 | 86 | ### Bug Fixes 87 | 88 | * **ohmyposh:** Ensure task won't fail because the PowerShell profile does not exist. ([b30ae1e](https://github.com/AlexNabokikh/windows-playbook/commit/b30ae1ee224a165891f1a1ffa18a4f5d7f2b7acc)) 89 | 90 | ## [1.12.0](https://github.com/AlexNabokikh/windows-playbook/compare/v1.11.0...v1.12.0) (2022-08-10) 91 | 92 | 93 | ### Features 94 | 95 | * **desktop.yml:** limit desktop cleanup to shortcuts only ([324fb27](https://github.com/AlexNabokikh/windows-playbook/commit/324fb2759f64ee21f8746803050c4a0df4efafeb)) 96 | 97 | 98 | ### Bug Fixes 99 | 100 | * **desktop.yml:** fixed typo ([3cbf360](https://github.com/AlexNabokikh/windows-playbook/commit/3cbf360951cc9ab190dddea91fd5e4c924f14fb4)) 101 | 102 | ## [1.11.0](https://github.com/AlexNabokikh/windows-playbook/compare/v1.10.0...v1.11.0) (2022-08-10) 103 | 104 | 105 | ### Features 106 | 107 | * **chocolatey:** improved choco packages installation task ([086473c](https://github.com/AlexNabokikh/windows-playbook/commit/086473cd96fa66db3071f8f5c5a8247a9ef05eb8)) 108 | 109 | 110 | ### Bug Fixes 111 | 112 | * **lint:** addressed yamllint warnings ([46a61b3](https://github.com/AlexNabokikh/windows-playbook/commit/46a61b39a28185b32ce053372813ff02533b3f17)) 113 | 114 | ## [1.10.0](https://github.com/AlexNabokikh/windows-playbook/compare/v1.9.0...v1.10.0) (2022-08-09) 115 | 116 | 117 | ### Features 118 | 119 | * **windows_updates:** improved windows updates installation task ([be2c975](https://github.com/AlexNabokikh/windows-playbook/commit/be2c975cc41ccb782a54c88b841a4e4a91ccad52)) 120 | 121 | ## [1.9.0](https://github.com/AlexNabokikh/windows-playbook/compare/v1.8.0...v1.9.0) (2022-07-31) 122 | 123 | 124 | ### Features 125 | 126 | * added oh-my-posh as a prompt theme engine for powershell ([b561390](https://github.com/AlexNabokikh/windows-playbook/commit/b561390f674d03c2bd03861c149ef7d256df1d76)) 127 | * **README.md:** added oh-my-posh theme change example ([63246f9](https://github.com/AlexNabokikh/windows-playbook/commit/63246f917ce84b288dd666ff5bb884d39f513cb8)) 128 | * replaced 7zip with the modern alternative ([222339e](https://github.com/AlexNabokikh/windows-playbook/commit/222339ee9c74f9c2be8d8e375cf89ff09b25cdb9)) 129 | 130 | 131 | ### Bug Fixes 132 | 133 | * **ohmyposh.yml:** replaced yes with true ([bde9253](https://github.com/AlexNabokikh/windows-playbook/commit/bde9253e068406de0079b828b3aea4a56a79152e)) 134 | 135 | ## [1.8.0](https://github.com/AlexNabokikh/windows-playbook/compare/v1.7.1...v1.8.0) (2022-06-16) 136 | 137 | 138 | ### Features 139 | 140 | * **.ansible-lint:** adjusted linter settings ([d8ef644](https://github.com/AlexNabokikh/windows-playbook/commit/d8ef6441f5e1ef0e0a1650a6994459615af371bd)) 141 | 142 | ### [1.7.1](https://github.com/AlexNabokikh/windows-playbook/compare/v1.7.0...v1.7.1) (2022-06-16) 143 | 144 | 145 | ### Bug Fixes 146 | 147 | * refactored modules definition according to best practices ([ae228a9](https://github.com/AlexNabokikh/windows-playbook/commit/ae228a9a486c687c47005d0f37d63b8bdd95ab97)) 148 | 149 | ## [1.7.0](https://github.com/AlexNabokikh/windows-playbook/compare/v1.6.1...v1.7.0) (2022-06-13) 150 | 151 | 152 | ### Features 153 | 154 | * **.yamllint.yml:** ignore github ci yaml during lint stage ([0d7fdc6](https://github.com/AlexNabokikh/windows-playbook/commit/0d7fdc67fffcb794ddd61a453f1b65df20160939)) 155 | * added 'defragment' task to the main config ([5779595](https://github.com/AlexNabokikh/windows-playbook/commit/57795954c50b9c9ea76e3744f9b0de128a5b970e)) 156 | * **chocolatey.yml:** added chocolatey and nuget cache clear task ([921b511](https://github.com/AlexNabokikh/windows-playbook/commit/921b5111caa87428e19d30d3ac79b61ab893e43e)) 157 | * **defrag.yml:** added 'defragment' task ([24016c8](https://github.com/AlexNabokikh/windows-playbook/commit/24016c8a75e1f6d7087147a0ec341c61944bbdf7)) 158 | * **updates.yml:** set 'state' explicitly for better readability ([7c66404](https://github.com/AlexNabokikh/windows-playbook/commit/7c66404dcacb312319c37dafcb5eeb67487e986e)) 159 | 160 | 161 | ### Bug Fixes 162 | 163 | * **defrag.yml:** fixed default value for valumes ([dc0ecbc](https://github.com/AlexNabokikh/windows-playbook/commit/dc0ecbcab409880904d42be5125cc66e518693af)) 164 | 165 | ### [1.6.1](https://github.com/AlexNabokikh/windows-playbook/compare/v1.6.0...v1.6.1) (2022-06-12) 166 | 167 | 168 | ### Bug Fixes 169 | 170 | * **README.md:** fixed badges and applied MD best practices ([525c805](https://github.com/AlexNabokikh/windows-playbook/commit/525c80556767ead48d5e82df527cade2348498b2)) 171 | * **README.md:** fixed gh badge link ([b253e6a](https://github.com/AlexNabokikh/windows-playbook/commit/b253e6a2dae5c30d0b287e322676f7fd6b63ca7a)) 172 | 173 | ## [1.6.0](https://github.com/AlexNabokikh/windows-playbook/compare/v1.5.1...v1.6.0) (2022-05-27) 174 | 175 | 176 | ### Features 177 | 178 | * added automatic semantic-release ([b3645ff](https://github.com/AlexNabokikh/windows-playbook/commit/b3645ffb70fb0545be9b37c867c119f6777c6a96)) 179 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Windows Ansible Playbook 2 | 3 | ![Logo](files/logo.png) 4 | 5 | ![badge-gh-actions] 6 | ![badge-windows-10] 7 | ![badge-windows-11] 8 | ![badge-license] 9 | 10 | This playbook installs and configures most of the software I use on my Windows 11 machine for software development. 11 | 12 | ## Contents 13 | 14 | - [Playbook capabilities](#playbook-capabilities) 15 | - [Installation](#installation) 16 | - [Windows host prerequisites installation](#prepare-your-windows-host-) 17 | - [Ansible control node prerequisites installation](#ansible-control-node-) 18 | - [Running a specific set of tagged tasks](#running-a-specific-set-of-tagged-tasks) 19 | - [Overriding Defaults](#overriding-defaults) 20 | - [Included Applications / Configuration (Default)](#included-applications--configuration-default) 21 | - [Available Parameters](#available-parameters) 22 | 23 | ## Playbook capabilities 24 | 25 | > **NOTE:** The Playbook is fully configurable. You can skip or reconfigure any task by [Overriding Defaults](#overriding-defaults). 26 | 27 | - **Software** 28 | - Remove Bloatware (see default config for a complete list of Bloatware). 29 | - Install software and packages selected by the user via Chocolatey. 30 | - Install software and packages selected by the user via WinGet. 31 | - **Windows apps & features** 32 | - Install and Enable Optional Windows Features chosen by the user. 33 | - Install and Enable the WSL2 distro selected by the user. 34 | - Run defragmentation on volumes selected by the user (in parallel). 35 | - **Windows Settings** 36 | - **Explorer** 37 | - Enable Explorer file extensions in file names. 38 | - Open Explorer in the Computer view by default. 39 | - Disable the Ribbon menu in Windows Explorer. 40 | - Enable Right-click Context Menu (Windows 11). 41 | - **Start Menu** 42 | - Disable Automatic Install of Suggested Apps. 43 | - Disable the "App Suggestions" in the Start menu. 44 | - Disable the "tips" popup. 45 | - Disable 'Windows Welcome Experience'. 46 | - **Taskbar** 47 | - Unpin 'Search' from Taskbar. 48 | - Unpin Task View, Chat, and Cortana from Taskbar. 49 | - Unpin 'News and Interests' from Taskbar. 50 | - Unpin 'People' from Taskbar. 51 | - Unpin 'Edge', 'Store' and other built-in shortcuts from the Taskbar. 52 | - **Desktop** 53 | - Remove Desktop icons (Ink). 54 | - **General** 55 | - Set the hostname selected by the user is assigned. 56 | - Configure remote desktop services. 57 | - Set the sound scheme to 'No sounds'. 58 | - Set the power plan selected by the user. 59 | - Install Windows updates categories selected by the user. 60 | - Disable mouse acceleration. 61 | - **Terminal Settings** 62 | - Install [oh-my-posh](https://ohmyposh.dev/) with the theme chosen by the user and it set as a default PowerShell theme engine. 63 | 64 | ## Installation 65 | 66 | ### Prepare your Windows host ⏲ 67 | 68 | #### **This playbook was tested on Windows 10 2004 and Windows 11 21H2 (Pro, Ent). Other versions may work but have not tried.** 69 | 70 | Copy and paste the code below into your PowerShell terminal to get your Windows machine ready to work with Ansible. 71 | 72 | ```powershell 73 | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 74 | $url = "https://raw.githubusercontent.com/AlexNabokikh/windows-playbook/master/setup.ps1" 75 | $file = "$env:temp\setup.ps1" 76 | 77 | (New-Object -TypeName System.Net.WebClient).DownloadFile($url, $file) 78 | powershell.exe -ExecutionPolicy ByPass -File $file -Verbose 79 | ``` 80 | 81 | ### Ansible Control node 🕹 82 | 83 | 1. [Install Ansible](https://docs.ansible.com/ansible/latest/installation_guide/index.html): 84 | 85 | 1. Upgrade Pip: `pip3 install --upgrade pip` 86 | 2. Install Ansible: `pip3 install ansible` 87 | 88 | 2. Clone or download this repository to your local drive. 89 | 3. Run `ansible-galaxy install -r requirements.yml` inside this directory to install required Ansible collections. 90 | 4. Add the IP address and credentials of your Windows machine into the `inventory` file 91 | 5. Run `ansible-playbook main.yml` inside this directory. 92 | 93 | ### Running a specific set of tagged tasks 94 | 95 | You can filter which part of the provisioning process to run by specifying a set of tags using `ansible-playbook` `--tags` flag. The tags available are `choco` , `debloat` , `desktop` , `explorer` , `fonts` , `hostname` , `mouse` , `power` , `sounds` , `start_menu` , `taskbar` , `updates` , `windows_features` , `wsl`, `winget`. 96 | 97 | ```sh 98 | ansible-playbook main.yml --tags "choco,wsl" 99 | ``` 100 | 101 | ## Overriding Defaults 102 | 103 | **NOTE:** You can override any of the defaults configured in `default.config.yml` by creating a `config.yml` file and setting the overrides in that file. For example, you can customize the installed packages and enable/disable specific tasks with something like: 104 | 105 | ```yaml 106 | configure_hostname: true 107 | custom_hostname: myhostname 108 | 109 | install_windows_updates: true 110 | update_categories: 111 | - Critical Updates 112 | - Security Updates 113 | - * # Installs all updates 114 | 115 | choco_installed_packages: 116 | # installs latest version of the Google Chrome while ignoring the package checksum 117 | - name: googlechrome 118 | state: latest 119 | choco_args: --ignorechecksum 120 | # installs 2.37.1 version of the git 121 | - name: git 122 | version: "2.37.1" 123 | # installs GO, but won't update it 124 | - golang 125 | 126 | install_fonts: true 127 | installed_nerdfonts: 128 | - Meslo 129 | 130 | install_ohmyposh: true 131 | ohmyposh_theme: agnoster 132 | 133 | install_windows_features: true 134 | windows_features: 135 | Microsoft-Hyper-V: true 136 | 137 | install_wsl2: true 138 | wsl2_distribution: wsl-archlinux 139 | 140 | remove_bloatware: true 141 | bloatware: 142 | - Microsoft.Messaging 143 | ``` 144 | 145 | ## Included Applications / Configuration (Default) 146 | 147 | Packages (installed with Chocolatey): 148 | 149 | - adobereader 150 | - auto-dark-mode 151 | - awscli 152 | - Firefox 153 | - git 154 | - golang 155 | - jre8 156 | - kubernetes-cli 157 | - microsoft-windows-terminal 158 | - peazip 159 | - powertoys 160 | - python3 161 | - sharex 162 | - telegram 163 | - terraform 164 | - vlc 165 | - vscode 166 | - zoom 167 | 168 | ## Available Parameters 169 | 170 | | Name | Description | Type | Default | 171 | | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------- | 172 | | configure_hostname | (Optional) Whether or not to set a custom hostname. | `bool` | `false` | 173 | | custom_hostname | (Optional) The hostname to set for the computer. | `string` | `windows-ansible` | 174 | | install_windows_updates | (Optional) Whether or not to install Windows updates. | `bool` | `true` | 175 | | update_categories | (Optional) A list of categories to install updates from. The value \* will match all categories. | `list` | `["CriticalUpdates", "SecurityUpdates", "UpdateRollups"]` | 176 | | windows_updates_reboot | (Optional) Whether or not to reboot the host if it is required and continue to install updates after the reboot. | `bool` | `true` | 177 | | remove_bloatware | (Optional) Whether or not to uninstall Windows bloatware. | `bool` | `true` | 178 | | bloatware | (Optional) A list of applications (bloatware) to be uninstalled | `list` | [full_list](https://github.com/AlexNabokikh/windows-playbook/blob/8be81399018d151e5f4f5ea08034fc4bd0ad30da/default.config.yml#L85) | 179 | | choco_installed_packages | (Optional) A list of Chocolatey packages to be installed. | `dict` | [full_list](#included-applications--configuration-default) | 180 | | choco_installed_packages.state | (Optional) State of the package on the system. (present, latest) | `string` | `present` | 181 | | choco_installed_packages.version | (Optional) Specific version of the package to be installed. | `string` | `omit` | 182 | | choco_installed_packages.choco_args | (Optional) Additional parameters to pass to choco.exe. | `string` | `omit` | 183 | | install_windows_features | (Optional) Whether or not to install Windows features. | `bool` | `false` | 184 | | windows_features | (Optional) A list of dicts with Windows features to be installed. | `list(dict)` | `Microsoft-Hyper-V: true` | 185 | | install_wsl2 | (Optional) Whether or not to install Windows Subsystem for Linux. | `bool` | `true` | 186 | | wsl2_distribution | (Optional) The valid name of Linux distribution that will be installed. | `string` | `wsl-ubuntu-2004` | 187 | | install_fonts | (Optional) Whether or not to install [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts/). | `bool` | `true` | 188 | | installed_nerdfonts | (Optional) A list of [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts/) to be installed. | `list` | `["FiraCode", "FantasqueSansMono"]` | 189 | | install_ohmyposh | (Optional) Whether or not to [Oh My Posh](https://ohmyposh.dev/). | `bool` | `true` | 190 | | configure_explorer | (Optional) Whether or not to configure Windows Explorer with sane defaults. | `bool` | `true` | 191 | | configure_taskbar | (Optional) Whether or not to configure Windows TaskBar with sane defaults. | `bool` | `true` | 192 | | configure_start_menu | (Optional) Whether or not to configure Windows Start menu with sane defaults. | `bool` | `true` | 193 | | set_sound_scheme | (Optional) Whether or not to set default Windows Sound Scheme to "No Sounds". | `bool` | `true` | 194 | | disable_mouse_acceleration | (Optional) Whether or not to disable mouse acceleration. | `bool` | `true` | 195 | | remote_desktop_enabled | (Optional) Whether or not enable Remote Desktop. | `bool` | `true` | 196 | | remove_desktop_icons | (Optional) Whether or not remove desktop icons (\*.lnk files only). | `bool` | `false` | 197 | | defrag_volumes | (Optional) Whether or not to perform disk defragmentation. | `bool` | `true` | 198 | | include_volumes | (Optional) A list of volumes to be defragmented. | `list` | `["C"]` | 199 | | change_power_plan | (Optional) Whether or not change Power Plan. | `bool` | `true` | 200 | | power_plan | (Optional) Choose a power plan (high_performance, balanced, power_saver). | `string` | `high_performance` | 201 | | install_winget_packages | (Optional) Whether or not to install WinGet packages. | `bool` | `true` | 202 | | winget_packages | (Required) A list of WinGet packages to be installed. | `dict` | | 203 | | winget_packages.name | (Optional) A name of the WinGet package to be installed. | `string` | | 204 | | winget_packages.source | (Optional) The source of the WinGet package (`msstore` or `winget`). | `string` | | 205 | | configure_storage_sense | (Optional) Whether or not configure Windows Storage Sense. | `string` | | 206 | | storage_sense | (Optional) A map of storage_sense options. | `dict` | | 207 | | storage_sense.enabled | (Optional) Enable or Disable Windows Storage Sense. | `bool` | `true` | 208 | | storage_sense.run_frequency | (Optional) How often Windows Storage Sense has to run (once in 1, 7 or 30 days). | `int` | `1` | 209 | | storage_sense.delete_unused_files | (Optional) Delete temporary files that my apps aren’t using. | `bool` | `true` | 210 | | storage_sense.delete_recycle_bin_files | (Optional) Delete files in my recycle bin. | `bool` | `true` | 211 | | storage_sense.recycle_bin_age | (Optional) How often recycle bin has to be cleaned up (once in 1, 14, 30 or 60 days). | `int` | `14` | 212 | | storage_sense.delete_downloads_files | (Optional) Delete files in my Downloads folder. | `bool` | `true` | 213 | | storage_sense.downloads_age | (Optional) How often downloaded files has to be cleaned up (once in 1, 14, 30 or 60 days). | `int` | `14` | 214 | 215 | ## Author 216 | 217 | This project was created by [Alexander Nabokikh](https://www.linkedin.com/in/nabokih/) (initially inspired by [geerlingguy/mac-dev-playbook](https://github.com/geerlingguy/mac-dev-playbook)). 218 | 219 | ## License 220 | 221 | This software is available under the following licenses: 222 | 223 | - **[MIT](https://github.com/AlexNabokikh/windows-playbook/blob/master/LICENSE)** 224 | 225 | [badge-gh-actions]: https://github.com/AlexNabokikh/windows-playbook/actions/workflows/release.yaml/badge.svg 226 | [badge-windows-11]: https://img.shields.io/badge/OS-Windows%2011%2021H2-blue 227 | [badge-windows-10]: https://img.shields.io/badge/OS-Windows%2010%2020H2-blue 228 | [badge-license]: https://img.shields.io/badge/License-MIT-informational 229 | --------------------------------------------------------------------------------