Can you give me an example that how to specify the category KB update applies too
Here is the output: -
ansible-playbook windows.yml -vvvansible-playbook 2.9.2
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/root/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.12 (default, Oct 8 2019, 14:14:10) [GCC 5.4.0 20160609]
Using /etc/ansible/ansible.cfg as config file
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Parsed /etc/ansible/hosts inventory source with ini plugin
PLAYBOOK: windows.yml ******************************************************************************************************************************************************
1 plays in windows.yml
PLAY [windows] *************************************************************************************************************************************************************
TASK [Gathering Facts] *****************************************************************************************************************************************************
task path: /etc/ansible/windows-playbook/windows.yml:2
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/setup.ps1
Pipelining is enabled.
<MQN-CKMH5E31UM7.corp.medqia.com> ESTABLISH WINRM CONNECTION FOR USER: None on PORT 5986 TO MQN-CKMH5E31UM7.corp.medqia.com
EXEC (via pipeline wrapper)
ok: [MQN-CKMH5E31UM7.corp.medqia.com]
META: ran handlers
TASK [Install all security, critical, and rollup updates without a scheduled task] *****************************************************************************************
task path: /etc/ansible/windows-playbook/windows.yml:12
win_updates: running win_updates module
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_updates.ps1
Pipelining is enabled.
<MQN-CKMH5E31UM7.corp.medqia.com> ESTABLISH WINRM CONNECTION FOR USER: None on PORT 5986 TO MQN-CKMH5E31UM7.corp.medqia.com
EXEC (via pipeline wrapper)
ok: [MQN-CKMH5E31UM7.corp.medqia.com] => {
“changed”: false,
“filtered_updates”: {
“20668013-76d9-43ec-a6f2-f76fb4271642”: {
“categories”: [
“Definition Updates”,
“Windows Defender”
],
“filtered_reason”: “category_names”,
“id”: “20668013-76d9-43ec-a6f2-f76fb4271642”,
“installed”: false,
“kb”: [
“2267602”
],
“title”: “Security Intelligence Update for Windows Defender Antivirus - KB2267602 (Version 1.307.2832.0)”
},
“5bb32ece-7c8c-4f07-ace1-7ba1d36736a1”: {
“categories”: [
“Updates”,
“Windows 10”
],
“filtered_reason”: “category_names”,
“id”: “5bb32ece-7c8c-4f07-ace1-7ba1d36736a1”,
“installed”: false,
“kb”: [
“4494452”
],
“title”: “2019-05 Update for Windows 10 Version 1709 for x64-based Systems (KB4494452)”
},
“65ecc208-c6b1-4fce-b892-fc2c93917d76”: {
“categories”: [
“Drivers”
],
“filtered_reason”: “category_names”,
“id”: “65ecc208-c6b1-4fce-b892-fc2c93917d76”,
“installed”: false,
“kb”: ,
“title”: “Logitech - Image - 10/24/2018 12:00:00 AM - 1.3.89.0”
},
“79bfbb87-ae9d-480d-9f6f-5c82361e015d”: {
“categories”: [
“Upgrades”
],
“filtered_reason”: “category_names”,
“id”: “79bfbb87-ae9d-480d-9f6f-5c82361e015d”,
“installed”: false,
“kb”: [
“4530684”
],
“title”: “Feature update to Windows 10, version 1909”
}
},
“found_update_count”: 0,
“installed_update_count”: 0,
“reboot_required”: false,
“updates”: {}
}
TASK [Install only security updates as a scheduled task for window machines] ***********************************************************************************************
task path: /etc/ansible/windows-playbook/windows.yml:19
win_updates: running win_updates module
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_updates.ps1
Pipelining is enabled.
<MQN-CKMH5E31UM7.corp.medqia.com> ESTABLISH WINRM CONNECTION FOR USER: None on PORT 5986 TO MQN-CKMH5E31UM7.corp.medqia.com
EXEC (via pipeline wrapper)
ok: [MQN-CKMH5E31UM7.corp.medqia.com] => {
“changed”: false,
“filtered_updates”: {
“20668013-76d9-43ec-a6f2-f76fb4271642”: {
“categories”: [
“Definition Updates”,
“Windows Defender”
],
“filtered_reason”: “category_names”,
“id”: “20668013-76d9-43ec-a6f2-f76fb4271642”,
“installed”: false,
“kb”: [
“2267602”
],
“title”: “Security Intelligence Update for Windows Defender Antivirus - KB2267602 (Version 1.307.2832.0)”
},
“5bb32ece-7c8c-4f07-ace1-7ba1d36736a1”: {
“categories”: [
“Updates”,
“Windows 10”
],
“filtered_reason”: “category_names”,
“id”: “5bb32ece-7c8c-4f07-ace1-7ba1d36736a1”,
“installed”: false,
“kb”: [
“4494452”
],
“title”: “2019-05 Update for Windows 10 Version 1709 for x64-based Systems (KB4494452)”
},
“65ecc208-c6b1-4fce-b892-fc2c93917d76”: {
“categories”: [
“Drivers”
],
“filtered_reason”: “category_names”,
“id”: “65ecc208-c6b1-4fce-b892-fc2c93917d76”,
“installed”: false,
“kb”: {
“Count”: 0,
“ReadOnly”: true,
“_NewEnum”: “System.__ComObject”
},
“title”: “Logitech - Image - 10/24/2018 12:00:00 AM - 1.3.89.0”
},
“79bfbb87-ae9d-480d-9f6f-5c82361e015d”: {
“categories”: [
“Upgrades”
],
“filtered_reason”: “category_names”,
“id”: “79bfbb87-ae9d-480d-9f6f-5c82361e015d”,
“installed”: false,
“kb”: [
“4530684”
],
“title”: “Feature update to Windows 10, version 1909”
}
},
“found_update_count”: 0,
“installed_update_count”: 0,
“reboot_required”: false,
“updates”: {}
}
TASK [Install only particular updates based on the KB numbers] *************************************************************************************************************
task path: /etc/ansible/windows-playbook/windows.yml:24
win_updates: running win_updates module
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_updates.ps1
Pipelining is enabled.
<MQN-CKMH5E31UM7.corp.medqia.com> ESTABLISH WINRM CONNECTION FOR USER: None on PORT 5986 TO MQN-CKMH5E31UM7.corp.medqia.com
EXEC (via pipeline wrapper)
ok: [MQN-CKMH5E31UM7.corp.medqia.com] => {
“changed”: false,
“filtered_updates”: {
“20668013-76d9-43ec-a6f2-f76fb4271642”: {
“categories”: [
“Definition Updates”,
“Windows Defender”
],
“filtered_reason”: “whitelist”,
“id”: “20668013-76d9-43ec-a6f2-f76fb4271642”,
“installed”: false,
“kb”: [
“2267602”
],
“title”: “Security Intelligence Update for Windows Defender Antivirus - KB2267602 (Version 1.307.2832.0)”
},
“5bb32ece-7c8c-4f07-ace1-7ba1d36736a1”: {
“categories”: [
“Updates”,
“Windows 10”
],
“filtered_reason”: “whitelist”,
“id”: “5bb32ece-7c8c-4f07-ace1-7ba1d36736a1”,
“installed”: false,
“kb”: [
“4494452”
],
“title”: “2019-05 Update for Windows 10 Version 1709 for x64-based Systems (KB4494452)”
},
“65ecc208-c6b1-4fce-b892-fc2c93917d76”: {
“categories”: [
“Drivers”
],
“filtered_reason”: “whitelist”,
“id”: “65ecc208-c6b1-4fce-b892-fc2c93917d76”,
“installed”: false,
“kb”: ,
“title”: “Logitech - Image - 10/24/2018 12:00:00 AM - 1.3.89.0”
},
“79bfbb87-ae9d-480d-9f6f-5c82361e015d”: {
“categories”: [
“Upgrades”
],
“filtered_reason”: “whitelist”,
“id”: “79bfbb87-ae9d-480d-9f6f-5c82361e015d”,
“installed”: false,
“kb”: [
“4530684”
],
“title”: “Feature update to Windows 10, version 1909”
}
},
“found_update_count”: 0,
“installed_update_count”: 0,
“reboot_required”: false,
“updates”: {}
}
TASK [Install all security updates with automatic reboots] *****************************************************************************************************************
task path: /etc/ansible/windows-playbook/windows.yml:34
win_updates: running win_updates module
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_updates.ps1
Pipelining is enabled.
<MQN-CKMH5E31UM7.corp.medqia.com> ESTABLISH WINRM CONNECTION FOR USER: None on PORT 5986 TO MQN-CKMH5E31UM7.corp.medqia.com
EXEC (via pipeline wrapper)
ok: [MQN-CKMH5E31UM7.corp.medqia.com] => {
“changed”: false,
“filtered_updates”: {
“20668013-76d9-43ec-a6f2-f76fb4271642”: {
“categories”: [
“Definition Updates”,
“Windows Defender”
],
“filtered_reason”: “category_names”,
“id”: “20668013-76d9-43ec-a6f2-f76fb4271642”,
“installed”: false,
“kb”: [
“2267602”
],
“title”: “Security Intelligence Update for Windows Defender Antivirus - KB2267602 (Version 1.307.2832.0)”
},
“5bb32ece-7c8c-4f07-ace1-7ba1d36736a1”: {
“categories”: [
“Updates”,
“Windows 10”
],
“filtered_reason”: “category_names”,
“id”: “5bb32ece-7c8c-4f07-ace1-7ba1d36736a1”,
“installed”: false,
“kb”: [
“4494452”
],
“title”: “2019-05 Update for Windows 10 Version 1709 for x64-based Systems (KB4494452)”
},
“65ecc208-c6b1-4fce-b892-fc2c93917d76”: {
“categories”: [
“Drivers”
],
“filtered_reason”: “category_names”,
“id”: “65ecc208-c6b1-4fce-b892-fc2c93917d76”,
“installed”: false,
“kb”: ,
“title”: “Logitech - Image - 10/24/2018 12:00:00 AM - 1.3.89.0”
},
“79bfbb87-ae9d-480d-9f6f-5c82361e015d”: {
“categories”: [
“Upgrades”
],
“filtered_reason”: “category_names”,
“id”: “79bfbb87-ae9d-480d-9f6f-5c82361e015d”,
“installed”: false,
“kb”: [
“4530684”
],
“title”: “Feature update to Windows 10, version 1909”
}
},
“found_update_count”: 0,
“installed_update_count”: 0,
“reboot_required”: false,
“updates”: {}
}
TASK [Ensure WinRM starts when the system has settled and is ready to work reliably] ***************************************************************************************
task path: /etc/ansible/windows-playbook/windows.yml:40
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_service.ps1
Pipelining is enabled.
<MQN-CKMH5E31UM7.corp.medqia.com> ESTABLISH WINRM CONNECTION FOR USER: None on PORT 5986 TO MQN-CKMH5E31UM7.corp.medqia.com
EXEC (via pipeline wrapper)
ok: [MQN-CKMH5E31UM7.corp.medqia.com] => {
“can_pause_and_continue”: false,
“changed”: false,
“depended_by”: ,
“dependencies”: [
“RPCSS”,
“HTTP”
],
“description”: “Windows Remote Management (WinRM) service implements the WS-Management protocol for remote management. WS-Management is a standard web services protocol used for remote software and hardware management. The WinRM service listens on the network for WS-Management requests and processes them. The WinRM Service needs to be configured with a listener using winrm.cmd command line tool or through Group Policy in order for it to listen over the network. The WinRM service provides access to WMI data and enables event collection. Event collection and subscription to events require that the service is running. WinRM messages use HTTP and HTTPS as transports. The WinRM service does not depend on IIS but is preconfigured to share a port with IIS on the same machine. The WinRM service reserves the /wsman URL prefix. To prevent conflicts with IIS, administrators should ensure that any websites hosted on IIS do not use the /wsman URL prefix.”,
“desktop_interact”: false,
“display_name”: “Windows Remote Management (WS-Management)”,
“exists”: true,
“name”: “WinRM”,
“path”: “C:\WINDOWS\System32\svchost.exe -k NetworkService -p”,
“start_mode”: “delayed”,
“state”: “running”,
“username”: “NT AUTHORITY\NetworkService”
}
META: ran handlers
META: ran handlers
PLAY RECAP *****************************************************************************************************************************************************************
MQN-CKMH5E31UM7.corp.medqia.com : ok=6 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0