I’m running Ansible 2.0.0.2 on a Ubuntu 14.04 Control Machine, trying to enable an Inbound port on a target Windows Server 2012 R2 using the win_firewall_rule.
Here’s my playbook:
name: Allow inbound connection to port 12398
action: win_firewall_rule
args:
name: “Port 12398”
enabled: yes
state: present
localport: 12398
protocol: TCP
action: allow
direction: In
Receiving this error message:
FAILED! => {“changed”: false, “failed”: true, “invocation”: {“module_name”: “win_firewall_rule”}, “msg”: “The property ‘failed’ cannot be found on this object. Verify that the property exists.”}
If you can’t wait for the module to be fixed you could try setting strict mode off at the start of the module code
To do so, copy the module (win_firewall_rule.ps1 and win_firewall_rule.py) into your /etc/ansible/library or into your role’s library folder and then after