【发布时间】:2020-02-26 07:28:07
【问题描述】:
我的目标是使用 ansible 关闭此“Windows 功能”,该功能可以在 Windows 机器上通过搜索“打开或关闭 Windows 功能”并进入 SMB 1.0/CIFS 文件共享支持来找到。
我的代码有问题,我无法禁用设置,请帮助。
代码:
- name: Turn off SMB
hosts: myhosts
become_method: runas
vars:
ansible_become_password: mysecurepasswordthatsnot123
tasks:
- win_shell: Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
become: yes
become_user: user
我的游戏有什么问题??错误与非交互模式有关??
【问题讨论】:
-
你能发布你收到的确切错误吗?
标签: windows powershell ansible centos smb