personium / ansible

Ansible files to set up a Personium unit.
Apache License 2.0
12 stars 15 forks source link

`Setting default zone` fails if the firewalld was already started #22

Closed Yonezawa-T2 closed 6 years ago

Yonezawa-T2 commented 6 years ago

Setting default zone in config_firewalld.yml may fail if the firewalld was already started when Start firewalld is executed.

If the firewalld was already started, Start firewalld is skipped and /etc/firewalld/zones/personium-zone.xml, which is deployed by Deploy /etc/firewalld/zones/personium-zone.xml, is not loaded. The firewalld may be enabled by CentOS installer.

ansible.log:

2018-04-18 22:20:23,801 p=25468 u=root |  TASK [Setting default zone] ****************************************************
2018-04-18 22:20:25,719 p=25468 u=root |  fatal: [192.168.77.4]: FAILED! => {"changed": true, "cmd": ["firewall-cmd", "--set-default-zone=personium-zone"], "delta": "0:00:01.585800", "end": "2018-04-18 22:20:25.703559", "msg": "non-zero return code", "rc": 112, "start": "2018-04-18 22:20:24.117759", "stderr": "\u001b[91mError: INVALID_ZONE: personium-zone\u001b[00m", "stderr_lines": ["\u001b[91mError: INVALID_ZONE: personium-zone\u001b[00m"], "stdout": "", "stdout_lines": []}

Start firewalld should have state: restarted instead of state: started.

hiroaki-shibata commented 6 years ago

Thank you for your comment, we will change state as your suggestion.