Skip to content

Commit 0db1779

Browse files
committed
ansible: move ip_local_port_range to tuned profile
1 parent 4e1a080 commit 0db1779

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

ansible/tasks/setup-system.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,3 @@
211211
name: 'net.core.somaxconn'
212212
value: 16834
213213

214-
- name: configure system
215-
ansible.posix.sysctl:
216-
name: 'net.ipv4.ip_local_port_range'
217-
value: '1025 65000'

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 ip_local_port_range
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.ip_local_port_range'
123+
path: '/etc/tuned/profiles/postgresql/tuned.conf'
124+
section: 'sysctl'
125+
state: 'present'
126+
value: "'1025 65000'"
114127
- name: tuned - Load zstd compressor module
115128
become: true
116129
community.general.modprobe:

0 commit comments

Comments
 (0)