---

- name: check firewalld installed
  stat: path=/usr/lib/systemd/system/firewalld.service get_md5=no
  register: firewalld_installed

- name: Allow http through the firewall
  firewalld: service=http permanent=true state=enabled
  notify: restart firewalld

- name: Allow https through the firewall
  firewalld: service=https permanent=true state=enabled
  notify: restart firewalld
  when: ssl == true

---

- name: check firewalld installed
  stat: path=/usr/lib/systemd/system/firewalld.service get_md5=no
  register: firewalld_installed

- name: Allow http through the firewall
  firewalld: service=http permanent=yes state=enabled immediate=yes

- name: Allow https through the firewall
  firewalld: service=https permanent=yes state=enabled immediate=yes
  when: ssl == true

Make the firewall changes immediate
Make the firewall changes immediate
