ansible / ansible.builtin / v2.9.27 / module / win_firewall Enable or disable the Windows Firewall | "added in version" 2.4 of ansible.builtin" Authors: Michael Eaton (@michaeldeaton) preview | supported by communityansible.builtin.win_firewall (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
Enable or Disable Windows Firewall profiles.
- name: Enable firewall for Domain, Public and Private profiles win_firewall: state: enabled profiles: - Domain - Private - Public tags: enable_firewall
- name: Disable Domain firewall win_firewall: state: disabled profiles: - Domain tags: disable_firewall
state: choices: - disabled - enabled description: - Set state of firewall for given profile. type: str profiles: choices: - Domain - Private - Public default: - Domain - Private - Public description: - Specify one or more profiles to change. type: list
enabled: description: Current firewall status for chosen profile (after any potential change). returned: always sample: true type: bool profiles: description: Chosen profile. returned: always sample: Domain type: str state: description: Desired state of the given firewall profile(s). returned: always sample: enabled type: list