Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.55 KB

File metadata and controls

49 lines (35 loc) · 1.55 KB

SQLPatch Automation for Windows Systems

Ansible Compatibility

A lightweight Ansible-based automation for deploying SQL Server patches across Windows environments, including AlwaysOn Availability Groups.
No custom modules required – uses native Ansible capabilities.


Features

  • 🛠️ Automated SQL Patching: Deploy updates to standalone SQL servers and AlwaysOn clusters.
  • 🔄 Cluster-Aware: Automatically detects and patches all nodes in an AlwaysOn cluster.
  • ☁️ Cloud-Ready: Compatible with Ansible Automation Platform (AAP) and AWX.
  • 🔒 Secure: Uses WinRM over HTTPS (port 5986) with NTLM authentication.

Prerequisites

  1. WinRM Configuration
    Ensure WinRM is properly configured on all target Windows systems.
  2. Ansible Setup
    • Ansible 2.10+ (tested with AAP/AWX)
    • ansible.windows collection installed:
      ansible-galaxy collection install ansible.windows

Configuration

Inventory Setup

      ansible_host: 192.168.1.20
      ansible_connection: winrm
      ansible_winrm_transport: ntlm
      ansible_port: '5986'

Assumptions

  1. You have knowledge on Ansible/ AWX
  2. You understand how the SQL patch (CU) works
  3. I am installing the patch using Chocolatey which is residing on an Artifactory repo