diff --git a/tasks/haproxy_post_install.yml b/tasks/haproxy_post_install.yml index 7f74160..72db060 100644 --- a/tasks/haproxy_post_install.yml +++ b/tasks/haproxy_post_install.yml @@ -77,3 +77,15 @@ opts: bind state: mounted fstype: none + +- name: Prevent SELinux from preventing haproxy from binding to arbitrary ports + seboolean: + name: haproxy_connect_any + state: yes + persistent: yes + tags: + - haproxy-service-config + notify: + - Reload haproxy + when: + - ansible_facts['selinux']['status'] == "enabled" diff --git a/tasks/haproxy_service_config.yml b/tasks/haproxy_service_config.yml index 766209a..a900539 100644 --- a/tasks/haproxy_service_config.yml +++ b/tasks/haproxy_service_config.yml @@ -41,15 +41,3 @@ (item.service.state is defined and item.service.state == 'absent') tags: - haproxy-service-config - -- name: Prevent SELinux from preventing haproxy from binding to arbitrary ports - seboolean: - name: haproxy_connect_any - state: yes - persistent: yes - tags: - - haproxy-service-config - notify: - - Reload haproxy - when: - - ansible_facts['selinux']['status'] == "enabled"