+---
+- include: is_systemd_installed.yml
+
- name: Check if FirewallD service is running
command: systemctl is-active firewalld
failed_when: firewalld_status.stdout not in ['unknown', 'active']
changed_when: false
register: firewalld_status
+ when: systemd_installed.rc == 0
- name: Open ODL NB REST port via FirewallD
- when: firewalld_status.stdout == 'active'
+ when: systemd_installed.rc == 0 and firewalld_status.stdout == 'active'
firewalld:
port={{ nb_rest_port }}/tcp
state=enabled
---
-- name: Check if systemd is installed
- command: rpm -q systemd
- register: systemd_installed
+- include: is_systemd_installed.yml
- include: start_odl_systemd_service.yml
- when: systemd_installed.rc == 1
+ when: systemd_installed.rc == 0