# Enabling firewalld kills ansible 2.0.2.0

**URL:** <https://forum.ansible.com/t/enabling-firewalld-kills-ansible-2-0-2-0/21424>\
**Category:** Ansible Project\
**Created:** [May 12, 2016, 7:24pm UTC](https://forum.ansible.com/t/enabling-firewalld-kills-ansible-2-0-2-0/21424 "2016-05-12T19:24:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dejay\_Clayton](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Dejay\_Clayton](https://forum.ansible.com/u/Dejay_Clayton)\
**Post date:** [May 12, 2016, 7:24pm UTC](https://forum.ansible.com/t/enabling-firewalld-kills-ansible-2-0-2-0/21424/1 "2016-05-12T19:24:58Z")

</div>

I’ve recently started running into a problem that I didn’t have before I upgraded from ansible 2.0.1.0 to 2.0.2.0. I don’t conclusively know whether the upgrade itself is responsible for the new behavior I’m seeing.

When executing a playbook against a vanilla Centos 7 installation, execution of the playbook terminates shortly after the first time I use ansible to enable the firewalld service. A few seconds after firewalld is enabled, whatever playbook step that happens to be running fails with “Failed to transfer file”… “connection closed by remote host”. Re-executing the playbook again works fine.

Setting retry on the playbook will likely fix my problem, although I’d like to understand why this is now necessary, whereas before it wasn’t.

---

<div class="post-metadata">

**Author:** ![Dejay\_Clayton](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Dejay\_Clayton](https://forum.ansible.com/u/Dejay_Clayton)\
**Post date:** [May 13, 2016, 3:51am UTC](https://forum.ansible.com/t/enabling-firewalld-kills-ansible-2-0-2-0/21424/2 "2016-05-13T03:51:43Z")

</div>

UPDATE: This problem only seems to occur when I’m using an SSH proxy to connect to the target. Introducing a 5 second pause after enabling firewalld seems to prevent the connection from failing, but who knows why I need to do that.

---

<div class="post-metadata">

**Author:** ![Dejay\_Clayton](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Dejay\_Clayton](https://forum.ansible.com/u/Dejay_Clayton)\
**Post date:** [May 13, 2016, 4:06pm UTC](https://forum.ansible.com/t/enabling-firewalld-kills-ansible-2-0-2-0/21424/3 "2016-05-13T16:06:40Z")

</div>

UPDATE: Here’s what appears in my logs when ansible causes my connection to be terminated:

May 13 16:03:51 localhost systemd: Started Session 16 of user root.  
May 13 16:03:51 localhost ansible-service: Invoked with name=firewalld pattern=None enabled=True state=started sleep=3 arguments= runlevel=default  
May 13 16:03:51 localhost systemd: Reloading.  
May 13 16:03:52 localhost systemd: Starting firewalld - dynamic firewall daemon…  
May 13 16:03:52 localhost NetworkManager[3050]: nm\_connection\_get\_setting\_connection: assertion `NM_IS_CONNECTION (connection)' failed May 13 16:03:52 localhost NetworkManager[3050]: nm_connection_get_setting_connection: assertion `NM\_IS\_CONNECTION (connection)’ failed  
May 13 16:03:52 localhost NetworkManager[3050]: nm\_connection\_get\_setting\_connection: assertion `NM_IS_CONNECTION (connection)' failed May 13 16:03:52 localhost NetworkManager[3050]: nm_connection_get_setting_connection: assertion `NM\_IS\_CONNECTION (connection)’ failed  
May 13 16:03:52 localhost NetworkManager[3050]: nm\_connection\_get\_setting\_connection: assertion `NM_IS_CONNECTION (connection)' failed May 13 16:03:52 localhost NetworkManager[3050]: nm_connection_get_setting_connection: assertion `NM\_IS\_CONNECTION (connection)’ failed  
May 13 16:03:52 localhost NetworkManager[3050]: nm\_connection\_get\_setting\_connection: assertion `NM_IS_CONNECTION (connection)' failed May 13 16:03:52 localhost NetworkManager[3050]: nm_connection_get_setting_connection: assertion `NM\_IS\_CONNECTION (connection)’ failed  
May 13 16:03:52 localhost NetworkManager[3050]: nm\_connection\_get\_setting\_connection: assertion `NM_IS_CONNECTION (connection)' failed May 13 16:03:52 localhost NetworkManager[3050]: nm_connection_get_setting_connection: assertion `NM\_IS\_CONNECTION (connection)’ failed  
May 13 16:03:52 localhost NetworkManager[3050]: nm\_connection\_get\_setting\_connection: assertion `NM\_IS\_CONNECTION (connection)’ failed  
May 13 16:03:52 localhost systemd: Started firewalld - dynamic firewall daemon.  
May 13 16:03:52 localhost systemd-logind: Removed session 16.

Note that I’ve tried to supply a sleep time of 3. This didn’t help.

---

<div class="post-metadata">

**Author:** ![Dejay\_Clayton](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Dejay\_Clayton](https://forum.ansible.com/u/Dejay_Clayton)\
**Post date:** [May 13, 2016, 6:44pm UTC](https://forum.ansible.com/t/enabling-firewalld-kills-ansible-2-0-2-0/21424/4 "2016-05-13T18:44:56Z")

</div>

UPDATE: Ignore the system logs I reported above. That same output happens even if I execute “systemctl start firewalld” through means other than ansible.
