From 240d109cc84f142a6ef50c150aa79af936074b44 Mon Sep 17 00:00:00 2001 From: Daniel 'f0o' Preussker Date: Sun, 19 Jan 2025 07:53:26 +0000 Subject: [PATCH] Make sysctl configuration path configurable Defaults to /etc/sysctl.conf to retain current behavior Change-Id: Ie6a84a31f8281c0240519e92a217359234f1e1bb --- defaults/main.yml | 2 ++ .../notes/haproxy_sysctl_location-e18310fd96597a6f.yaml | 6 ++++++ tasks/haproxy_post_install.yml | 1 + 3 files changed, 9 insertions(+) create mode 100644 releasenotes/notes/haproxy_sysctl_location-e18310fd96597a6f.yaml diff --git a/defaults/main.yml b/defaults/main.yml index c8aa61d..923965c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -328,3 +328,5 @@ haproxy_static_files_default: condition: "{{ haproxy_security_txt_content is truthy }}" haproxy_static_files_extra: [] haproxy_static_files: "{{ haproxy_static_files_default + haproxy_static_files_extra }}" + +haproxy_sysctl_file: "{{ openstack_sysctl_file | default('/etc/sysctl.conf') }}" diff --git a/releasenotes/notes/haproxy_sysctl_location-e18310fd96597a6f.yaml b/releasenotes/notes/haproxy_sysctl_location-e18310fd96597a6f.yaml new file mode 100644 index 0000000..0c8c96d --- /dev/null +++ b/releasenotes/notes/haproxy_sysctl_location-e18310fd96597a6f.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Allow the definition of a custom sysctl config path through + `openstack_sysctl_file` and/or `haproxy_sysctl_file`. + Defaults to `/etc/sysctl.conf` to retain backwards compatibility. diff --git a/tasks/haproxy_post_install.yml b/tasks/haproxy_post_install.yml index 5e28b25..e7d9167 100644 --- a/tasks/haproxy_post_install.yml +++ b/tasks/haproxy_post_install.yml @@ -18,6 +18,7 @@ name: "{{ item }}" value: 1 sysctl_set: true + sysctl_file: "{{ haproxy_sysctl_file }}" state: present when: haproxy_bind_on_non_local | bool with_items: