My goal is to use ansible to turn off this "windows feature" that can be found on a windows machine by searching "Turn Windows features on or off" and going down to SMB 1.0/CIFS File Sharing Support.
Something is wrong with my code and I cannot get the setting disabled, please help.
CODE:
- 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
What is wrong with my play?? Error has to do with non interactive mode??
not sure about win_shell.. but ansible doc suggests to use win_optional_feature . Have you tried this way?
also, there is a sample play available at this link for windows features using win_command.. check it out.
i am sure you would have seen this blog
not sure about win_shell.. but ansible doc suggests to use win_optional_feature. Have you tried this way?
also, there is a sample play available at this link for windows features using win_command.. check it out.
i am sure you would have seen this blog
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.