From d5b3bdba20e8e636d0fa63ec2ca5474ee84dc918 Mon Sep 17 00:00:00 2001 From: Damian Dabrowski Date: Tue, 14 Feb 2023 12:24:43 +0100 Subject: [PATCH] Move selinux fix to haproxy_post_install.yml haproxy_service_config.yml is not a valid place for selinux fix. It should be moved to haproxy_post_install.yml. Change-Id: Ice55e1cd9fdbac6e564c7f084dc1a020940a0da8 --- tasks/haproxy_post_install.yml | 12 ++++++++++++ tasks/haproxy_service_config.yml | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) 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"