Coder Social home page Coder Social logo

windows-playbook's Introduction

Logo

Windows Ansible Playbook

CI badge-windows-10 badge-windows-11 badge-license

This playbook installs and configures most of the software I use on my Windows 11 machine for software development.

Contents

Playbook capabilities

NOTE: The Playbook is fully configurable. You can skip or reconfigure any task by Overriding Defaults.

  • Software
    • Ensures Bloatware removed (see default config for a complete list of Bloatware).
    • Ensure software and packages selected by the user are installed via Chocolatey.
  • Windows apps & features
    • Ensures the Optional Windows Features selected by the user are installed and enabled.
    • Ensures WSL2 distro selected by the user is installed and enabled.
  • Windows Settings
    • Explorer
      • Ensures Explorer includes the file extension in file names.
      • Ensures Explorer opens itself to the Computer view.
      • Ensures Ribbon menu is disabled in Windows Explorer.
      • Ensures Right-click Context Menu enabled (Windows 11).
    • Start Menu
      • Ensures Automatic Install of Suggested Apps disabled.
      • Ensures App Suggestions in Start menu disabled.
      • Ensures popup "tips" about Windows disabled.
      • Ensures 'Windows Welcome Experience' disabled.
    • Taskbar
      • Ensures 'Search' unpinned from Taskbar.
      • Ensures Task View, Chat and Cortana are unpinned from Taskbar.
      • Ensures 'News and Interests' unpinned from Taskbar.
      • Ensures 'People' unpinned from Taskbar.
      • Ensures 'Edge', 'Store' other built-in shortcuts unpinned from Taskbar.
    • Desktop
      • Ensure Desktop icons are removed.
    • General
      • Ensure configured hostname selected by the user is set.
      • Ensure remote desktop services configured.
      • Ensure sound scheme set to 'No sounds'.
      • Ensure the power plan selected by the user is set.
      • Ensure Windows updates are selected by the user installed.
      • Ensures mouse acceleration is disabled.

Installation

Prepare your Windows host โฒ

This playbook was tested on Windows 10 2004 and Windows 11 21H2 (Pro, Ent). Other versions may work but have not tried.

Copy and paste the code below into your PowerShell terminal to get your Windows machine ready to work with Ansible.

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$url = "https://raw.githubusercontent.com/AlexNabokikh/windows-playbook/master/setup.ps1"
$file = "$env:temp\setup.ps1"

(New-Object -TypeName System.Net.WebClient).DownloadFile($url, $file)
powershell.exe -ExecutionPolicy ByPass -File $file -Verbose

Ansible Control node ๐Ÿ•น

  1. Install Ansible:

    1. Upgrade Pip: pip3 install --upgrade pip
    2. Install Ansible: pip3 install ansible
  2. Clone or download this repository to your local drive.

  3. Run ansible-galaxy install -r requirements.yml inside this directory to install required Ansible collections.

  4. Add the IP address and credentials of your Windows machine into the inventory file

  5. Run ansible-playbook main.yml inside this directory.

Running a specific set of tagged tasks

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 .

ansible-playbook main.yml --tags "choco,wsl"

Overriding Defaults

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:

configure_hostname: true
custom_hostname: myhostname

install_windows_updates: true
update_categories:
  - Critical Updates
  - Security Updates

choco_installed_packages:
  - googlechrome
  - git
  - golang

install_fonts: true
installed_nerdfonts:
  - Meslo

install_windows_features: true
windows_features:
  Microsoft-Hyper-V: true

install_wsl2: true
wsl2_distribution: wsl-archlinux

remove_bloatware: true
bloatware:
  - Microsoft.Messaging

Included Applications / Configuration (Default)

Packages (installed with Chocolatey):

  • 7zip
  • adobereader
  • auto-dark-mode
  • awscli
  • capture2text
  • choco-cleaner
  • choco-upgrade-all-at-startup
  • Firefox
  • git
  • golang
  • jre8
  • kubernetes-cli
  • microsoft-windows-terminal
  • powertoys
  • python3
  • telegram
  • terraform
  • vlc
  • vscode
  • zoom

Author

This project was created by Alexander Nabokikh (originally inspired by geerlingguy/mac-dev-playbook).

License

This software is available under the following licenses:

windows-playbook's People

Contributors

alexnabokikh avatar jantari avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.