From c16ab291dd1c5d0671d0c8564deb7ee09fa9a354 Mon Sep 17 00:00:00 2001 From: ace Date: Sun, 16 Jun 2024 17:39:10 +0300 Subject: [PATCH] fix selinux for haproxy --- roles/haproxy/tasks/package.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/haproxy/tasks/package.yml b/roles/haproxy/tasks/package.yml index 53846a2..09f1e52 100644 --- a/roles/haproxy/tasks/package.yml +++ b/roles/haproxy/tasks/package.yml @@ -13,6 +13,13 @@ - restart haproxy when: haproxy_config is defined + - name: set haproxy_connect_any flag on and keep it persistent across reboots + ansible.posix.seboolean: + name: haproxy_connect_any + state: yes + persistent: yes + when: ansible_selinux is defined and ansible_selinux != False and ansible_selinux.status == 'enabled' + - name: start haproxy service systemd: name: haproxy