# Firewalld settings dont persist when service restarted.

**URL:** <https://forum.ansible.com/t/firewalld-settings-dont-persist-when-service-restarted/31415>\
**Category:** Ansible Project\
**Created:** [October 3, 2019, 3:00pm UTC](https://forum.ansible.com/t/firewalld-settings-dont-persist-when-service-restarted/31415 "2019-10-03T15:00:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Hill](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@Dave\_Hill](https://forum.ansible.com/u/Dave_Hill)\
**Post date:** [October 3, 2019, 3:00pm UTC](https://forum.ansible.com/t/firewalld-settings-dont-persist-when-service-restarted/31415/1 "2019-10-03T15:00:36Z")

</div>

I have the following code, which works fine with ansible. However i’ve noticed when i restart my firewall service, my settings appear to not persist. Any idea why? **Ansible 2.7**

**Before service restart (with ansible configs applied) This is what i expect to see;**  
  
**`**

 

[root@driv-vch4-ha01 dhill]# firewall-cmd --get-active-zones  
drop  
interfaces: ens224  
public  
interfaces: ens192

`</b> <b>`

[root@driv-vch4-ha01 dhill]# systemctl restart firewalld  
[root@driv-vch4-ha01 dhill]# firewall-cmd --get-active-zones  
public  
interfaces: ens192 ens224

**`**

- name: Enable firewall service + start  
service:  
name: firewalld  
state: started  
enabled: yes

- name: Put Customer interface into DROP zone  
firewalld:  
interface: “{{ vrrp\_interface }}”  
zone: drop  
permanent: yes  
immediate: yes  
state: enabled

- name: Allow http  
firewalld:  
service: http  
zone: drop  
permanent: yes  
immediate: yes  
state: enabled

- name: Allow https  
firewalld:  
service: https  
zone: drop  
permanent: yes  
immediate: yes  
state: enabled

- name: Allow https  
firewalld:  
service: https  
zone: drop  
permanent: yes  
immediate: yes  
state: enabled

- name: Allow pings  
firewalld:  
rich\_rule: rule family=“ipv4” protocol value=“icmp” accept  
zone: drop  
permanent: yes  
immediate: yes  
state: enabled

- name: Open up Traefik dashboard on public zone.  
firewalld:  
port: 8080/tcp  
permanent: yes  
zone: public  
state: enabled  
immediate: yes
