community.windows.win_firewall – Enable or disable the Windows Firewall¶
Note
This plugin is part of the community.windows collection (version 1.3.0).
To install it use: ansible-galaxy collection install community.windows
.
To use it in a playbook, specify: community.windows.win_firewall
.
Requirements¶
The below requirements are needed on the host that executes this module.
This module requires Windows Management Framework 5 or later.
Parameters¶
See Also¶
See also
- community.windows.win_firewall_rule
The official documentation on the community.windows.win_firewall_rule module.
Examples¶
- name: Enable firewall for Domain, Public and Private profiles
community.windows.win_firewall:
state: enabled
profiles:
- Domain
- Private
- Public
tags: enable_firewall
- name: Disable Domain firewall
community.windows.win_firewall:
state: disabled
profiles:
- Domain
tags: disable_firewall
- name: Enable firewall for Domain profile and block outbound connections
community.windows.win_firewall:
profiles: Domain
state: enabled
outbound_action: block
tags: block_connection
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Michael Eaton (@michaeldeaton)