# firewalld rich rule error if already defined

**URL:** <https://forum.ansible.com/t/firewalld-rich-rule-error-if-already-defined/20245>\
**Category:** Ansible Project\
**Created:** [January 18, 2016, 1:55am UTC](https://forum.ansible.com/t/firewalld-rich-rule-error-if-already-defined/20245 "2016-01-18T01:55:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dewangga\_Bachrul\_Ala](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@Dewangga\_Bachrul\_Ala](https://forum.ansible.com/u/Dewangga_Bachrul_Ala)\
**Post date:** [January 18, 2016, 1:55am UTC](https://forum.ansible.com/t/firewalld-rich-rule-error-if-already-defined/20245/1 "2016-01-18T01:55:44Z")

</div>

Got something interesting there,

I have firewalld rules like this:

- - name: Ensure FirewallD is started and enabled  
&nbsp;&nbsp;service: name=firewalld state=started enabled=yes

- - name: Enabling firewalld on MariaDB Server  
&nbsp;&nbsp;firewalld: rich\_rule="rule port port={{ item.port }} protocol={{  
item.proto }} family='ipv4' source address={{ item.address }} accept"  
permanent=true immediate=yes state=enabled  
&nbsp;&nbsp;with\_items:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- { port: 3306, address: 192.168.2.0/24, proto: tcp }  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- { port: 4567, address: 192.168.2.0/24, proto: tcp }  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- { port: 4568, address: 192.168.2.0/24, proto: tcp }  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- { port: 4444, address: 192.168.2.0/24, proto: tcp }  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- { port: 4567, address: 192.168.2.0/24, proto: udp }  
&nbsp;&nbsp;ignore\_errors: True

should I use `ignore_errors: True` ? If not, the result will be error  
if the port already enabled.

I use ansible 1.9.4.
