New in version 2.0.
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| action |
yes |
|
What to do with the items this rule is for.
|
|
| description |
no |
Description for the firewall rule.
|
||
| direction |
yes |
|
Is this rule for inbound or outbound traffic.
|
|
| enabled |
no | yes |
|
Is this firewall rule enabled or disabled.
aliases: enable
|
| localip |
no | any |
The local ip address this rule applies to.
|
|
| localport |
no |
The local port this rule applies to.
|
||
| name |
yes |
The rules name
|
||
| profiles |
no | domain,private,public |
The profile this rule applies to.
aliases: profile
|
|
| program |
no |
The program this rule applies to.
|
||
| protocol |
no | any |
The protocol this rule applies to.
|
|
| remoteip |
no | any |
The remote ip address/range this rule applies to.
|
|
| remoteport |
no |
The remote port this rule applies to.
|
||
| service |
no |
The service this rule applies to.
|
||
| state |
no | present |
|
Should this rule be added or removed.
|
- name: Firewall rule to allow SMTP on TCP port 25 win_firewall_rule: name: SMTP localport: 25 action: allow direction: in protocol: tcp state: present enabled: yes - name: Firewall rule to allow RDP on TCP port 3389 win_firewall_rule: name: Remote Desktop localport: 3389 action: allow direction: in protocol: tcp profiles: private state: present enabled: yes
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.