Skip to content

Commit 72e2fc3

Browse files
committed
max open files #2
1 parent b652c1d commit 72e2fc3

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

tests/deploy/cluster.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,16 @@
4646
environment:
4747
LD_LIBRARY_PATH: "{{pg_dst}}/lib/"
4848

49-
5049
- hosts: clients
5150
tasks:
52-
- name: increase open files
53-
shell: "echo '{{ansible_ssh_user}} soft nofile 65535' > /etc/security/limits.d/cluster.conf"
54-
args:
55-
creates: "/etc/security/limits.d/cluster.conf"
51+
- name: increase max open files
52+
lineinfile:
53+
dest: /etc/security/limits.d/cluster.conf
54+
line: "{{item}}"
55+
state: present
56+
with_items:
57+
- '{{ansible_ssh_user}} soft nofile 65535'
58+
- '{{ansible_ssh_user}} hard nofile 65535'
5659
sudo: yes
5760

5861
- name: copy pg source

tests/deploy/roles/postgres/tasks/main.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- bison
1111
- flex
1212
- libreadline-dev
13-
when: ansible_os_family == "Debian"
13+
when: (pg_copydist is undefined) and ansible_os_family == "Debian"
1414
sudo: yes
1515

1616
- name: ensure dependencies (RedHat)
@@ -34,10 +34,14 @@
3434
shell: sysctl kernel.sem='1000 128000 128 512'
3535
sudo: yes
3636

37-
- name: increase open files
38-
shell: "echo '{{ansible_ssh_user}} soft nofile 65535' > /etc/security/limits.d/cluster.conf"
39-
args:
40-
creates: "/etc/security/limits.d/cluster.conf"
37+
- name: increase max open files
38+
lineinfile:
39+
dest: /etc/security/limits.d/cluster.conf
40+
line: "{{item}}"
41+
state: present
42+
with_items:
43+
- '{{ansible_ssh_user}} soft nofile 65535'
44+
- '{{ansible_ssh_user}} hard nofile 65535'
4145
sudo: yes
4246

4347
#############################################################################

0 commit comments

Comments
 (0)