ansible / ansible.builtin / v2.5.15 / module / win_firewall Enable or disable the Windows Firewall | "added in version" 2.4 of ansible.builtin" Authors: Michael Eaton (@if-meaton) preview | supported by communityansible.builtin.win_firewall (v2.5.15) — module
pip
Install with pip install ansible==2.5.15
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: - enabled - disabled description: - Set state of firewall for given profile. profiles: choices: - Domain - Private - Public default: - Domain - Private - Public description: - Specify one or more profiles to change.
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: string state: description: desired state of the given firewall profile(s) returned: always sample: enabled type: list