Skip to content

Commit 752dd55

Browse files
authored
ansible: move tcp_keepalive_time to tuned profile (#2197)
1 parent 83524af commit 752dd55

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

ansible/tasks/setup-system.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,6 @@
154154
owner: 'root'
155155
group: 'root'
156156

157-
# Set Sysctl params specific to keepalives
158-
- name: Set net.ipv4.tcp_keepalive_time=1800
159-
ansible.builtin.sysctl:
160-
name: 'net.ipv4.tcp_keepalive_time'
161-
value: 1800
162-
state: 'present'
163-
164157
- name: Set net.ipv4.tcp_keepalive_intvl=60
165158
ansible.builtin.sysctl:
166159
name: 'net.ipv4.tcp_keepalive_intvl'

ansible/tasks/setup-tuned.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,19 @@
111111
state: 'present'
112112
value: 10
113113

114+
115+
- name: tuned - Set tcp_keepalive_time
116+
become: true
117+
community.general.ini_file:
118+
create: true
119+
group: 'root'
120+
mode: '0644'
121+
no_extra_spaces: true
122+
option: 'net.ipv4.tcp_keepalive_time'
123+
path: '/etc/tuned/profiles/postgresql/tuned.conf'
124+
section: 'sysctl'
125+
state: 'present'
126+
value: 1800
114127
- name: tuned - Load zstd compressor module
115128
become: true
116129
community.general.modprobe:

0 commit comments

Comments
 (0)