Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: new win_netbios module #58331

Open
wants to merge 6 commits into
base: devel
from

Conversation

Projects
None yet
3 participants
@tmmruk
Copy link
Contributor

commented Jun 25, 2019

SUMMARY

New module request to manage NetBIOS settings on Windows network adapters.
Allows you to easily disable or enable NetBIOS over TCP/IP on individual network adapters or system wide on a Windows machine. Functionality is often required in corporate environments to protect systems against NBT-NS poisoning attacks or name resolution broadcast storms.

Uses WMI call to perform action rather than using registry keys as it does not require a reboot in most cases.

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

win_netbios

ADDITIONAL INFORMATION

Does not have any special requirements outside the standard Windows WinRM/PowerShell configuration.
Tested back to 2008 R2 with PowerShell 3.0.

Thomas Moore Thomas Moore
@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jun 25, 2019

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/windows/win_netbios.py:54:19: W291 trailing whitespace

The test ansible-test sanity --test pslint [explain] failed with 7 errors:

lib/ansible/modules/windows/win_netbios.ps1:31:31: PSAvoidUsingWMICmdlet File 'win_netbios.ps1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems.
lib/ansible/modules/windows/win_netbios.ps1:35:24: PSAvoidUsingWMICmdlet File 'win_netbios.ps1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems.
lib/ansible/modules/windows/win_netbios.ps1:35:111: PSAvoidUsingCmdletAliases 'Select' is an alias of 'Select-Object'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.
lib/ansible/modules/windows/win_netbios.ps1:36:31: PSAvoidUsingWMICmdlet File 'win_netbios.ps1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems.
lib/ansible/modules/windows/win_netbios.ps1:45:1: PSAvoidTrailingWhitespace Line has trailing whitespace
lib/ansible/modules/windows/win_netbios.ps1:46:56: PSAvoidTrailingWhitespace Line has trailing whitespace
lib/ansible/modules/windows/win_netbios.ps1:60:1: PSAvoidTrailingWhitespace Line has trailing whitespace

The test ansible-test sanity --test shebang [explain] failed with 2 errors:

lib/ansible/modules/windows/win_netbios.ps1:0:0: module should not be executable
lib/ansible/modules/windows/win_netbios.py:0:0: module should not be executable

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/windows/win_netbios.ps1:0:0: E337 Argument 'state' in argument_spec defines type as 'str' but documentation doesn't define type

click here for bot help

@ansibot

This comment has been minimized.

Thomas Moore Thomas Moore

@ansibot ansibot removed the ci_verified label Jun 25, 2019

Thomas Moore added some commits Jun 25, 2019

Thomas Moore Thomas Moore
Thomas Moore Thomas Moore
@ansibot

This comment has been minimized.

@jhawkesworth

This comment has been minimized.

Copy link
Contributor

commented Jun 25, 2019

This looks like a good facility to have to me.
Would it be possible to add any integration tests for it? There's some information here about windows integration tests: https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_windows.html#windows-integration-testing but you can ask in #ansible-windows or #ansible-devel irc channels if you have specific questions.

@ansibot ansibot removed the needs_triage label Jun 25, 2019

Thomas Moore added some commits Jul 2, 2019

Thomas Moore Thomas Moore
Thomas Moore Thomas Moore
@tmmruk

This comment has been minimized.

Copy link
Contributor Author

commented Jul 2, 2019

@jhawkesworth - Integration tests added as requested :)

@ansibot ansibot added the stale_ci label Jul 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.