ansible - 无法使用 win_updates 进行修补
问题描述
我尝试了下面的剧本。但由于某种原因,它没有列出我可以在该服务器上的 SCCM 本地查看的补丁程序。请任何指点。
hosts: all
gather_facts: no
tasks:
- name: Install only particular updates based on the KB numbers for MVC
win_updates:
# server_selection: managed_server
category_name:
- SecurityUpdates
- CriticalUpdates
whitelist:
- KB2993928
# state: searched
# log_path: d:\non-deploy\patches.txt
我已经尝试过上面的剧本。我什至尝试过 state:search, server_selection: managed server too.(不成功)
我希望找到并应用补丁。
这是输出。
==========
2019-09-16 21:48:16Z WUA is available in current logon process, running natively
2019-09-16 21:48:16Z Creating Windows Update session...
2019-09-16 21:48:16Z Create Windows Update searcher...
2019-09-16 21:48:16Z Setting the Windows Update Agent source catalog...
2019-09-16 21:48:16Z Requested search source is 'default'
2019-09-16 21:48:16Z Search source set to 'default' (ServerSelection = 0)
2019-09-16 21:48:16Z Searching for updates to install
2019-09-16 21:48:20Z Found 0 updates
2019-09-16 21:48:20Z Creating update collection...
2019-09-16 21:48:20Z Calculating pre-install reboot requirement...
2019-09-16 21:48:20Z Check mode: exiting...
2019-09-16 21:48:20Z Return value:
{
"updates": {
},
"found_update_count": 0,
"changed": false,
"reboot_required": false,
"installed_update_count": 0,
"filtered_updates": {
}
}
2019-09-16 21:48:20Z Native job completed with output:
Name Value
---- -----
updates {}
found_update_count 0
changed False
reboot_required False
installed_update_count 0
filtered_updates {}
==========
解决方案
推荐阅读
- transactions - 服务器端 JavaScript 事务 - Marklogic
- mysql - 如何从多个表中计算不同的 id?
- android - 我请求大量访问令牌而不重用 API 可以吗?
- python - Django 与 Peewee 连接池 MySQL 断开连接
- java - 从java中的哈希映射返回第n个值和键
- javascript - 发送数据后刷新 ng-model
- c++ - 如何在 C++ 中的 QMessageBox 中设置文本颜色
- python - Keras 中用于加权错误分类样本的自定义损失函数
- sql-server - 在 .NET Core 2.1 中将 IIS 基本身份验证传递给 SQL Server
- jquery - 自定义具有 4 个不同范围的 jQuery UI 滑块