main.yml 954 Bytes
Newer Older
kk's avatar
qwerty  
kk committed
1
---
Aleksey Shirokih's avatar
Aleksey Shirokih committed
2
3
4
# http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.qb.server.doc/doc/t0008238.html?lang=ru
- name: tune systcl for PostgesSQL
  sysctl:
EKbfh's avatar
EKbfh committed
5
6
    name: "{{ item.name }}"
    value: "{{ item.value }}"
Aleksey Shirokih's avatar
Aleksey Shirokih committed
7
    state: present
Aleksey Shirokih's avatar
Aleksey Shirokih committed
8
    reload: "True"
Aleksey Shirokih's avatar
Aleksey Shirokih committed
9
10
11
12
13
14
15
  with_items:
    - { name: kernel.shmmax, value: "{{ kernel_shmmax }}" }
    - { name: kernel.shmall, value: "{{ kernel_shmall }}" }
    - { name: kernel.sem, value: '250 256000 400 4096' }
  tags:
    - config

Aleksey Shirokih's avatar
Aleksey Shirokih committed
16
- include_tasks: install.yml
17
18
  tags:
    - requirements
kk's avatar
qwerty  
kk committed
19
20

- name: PostgreSQL init db
21
  command: '{{ postgres_bin_dir }}/postgresql{% if postgres_version == "14" %}-{% endif %}{{ postgres_version|replace(".","") }}-setup initdb'
22
  args:
23
    creates: /var/lib/pgsql/{{ postgres_version }}/initdb.log
kk's avatar
qwerty  
kk committed
24

Aleksey Shirokih's avatar
Aleksey Shirokih committed
25
26
27
28
29
30
- name: Install postgres limits file
  template:
    src: "etc/security/limits.d/postgres_limits.conf.j2"
    dest: "/etc/security/limits.d/postgres_limits.conf"
  tags:
    - config