Skip to content

Commit ad9e374

Browse files
authored
refactor(ansible): relocate net.ipv4.ip_local_port_range to postgresql tuned profile (#2203)
1 parent fa02965 commit ad9e374

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

ansible/tasks/setup-system.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,3 @@
170170
ansible.posix.sysctl:
171171
name: 'net.core.somaxconn'
172172
value: 16834
173-
174-
- name: configure system
175-
ansible.posix.sysctl:
176-
name: 'net.ipv4.ip_local_port_range'
177-
value: '1025 65000'

ansible/tasks/setup-tuned.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,19 @@
135135
state: 'present'
136136
value: '3000,3001,8085,9122,9187,9999'
137137

138+
- name: tuned - Set ip_local_port_range
139+
become: true
140+
community.general.ini_file:
141+
create: true
142+
group: 'root'
143+
mode: '0644'
144+
no_extra_spaces: true
145+
option: 'net.ipv4.ip_local_port_range'
146+
path: '/etc/tuned/profiles/postgresql/tuned.conf'
147+
section: 'sysctl'
148+
state: 'present'
149+
value: '1025 65000'
150+
138151
- name: tuned - Set vm.panic_on_oom
139152
become: true
140153
community.general.ini_file:

0 commit comments

Comments
 (0)