linux-zfs: Get rid of "zpool-scrub" config, now included in "zfs-utils"
[AnsibleRoles.git] / roles / postgresql-server / tasks / main.yml
1 ---
2 # tasks file for postgresql-server
3
4 - name: create LVM LV and file system for PostgreSQL data
5   tags:
6     - postgresql
7     - fs
8   include_role:
9     name: lvm-lv
10   vars:
11     lvm_vg: "{{ postgresql_server_vg }}"
12     lvm_lv_name: "{{ postgresql_server_lv_name }}"
13     lvm_lv_size: "{{ postgresql_server_lv_size }}"
14     lvm_lv_mountpoint: "/var/lib/postgresql"
15   when: postgresql_server_vg != "" and postgresql_server_lv_name != ""
16
17 - name: install PostgreSQL {{ postgresql_major }} packages for client and server
18   tags:
19     - packages
20     - postgresql
21   apt: >
22     state=present
23     name=postgresql-{{ postgresql_major }}
24
25 - name: ensure service "postgresql" is enabled and started
26   tags:
27     - services
28     - postgres
29     - postgresql
30   service: >
31     enabled=yes
32     name=postgresql
33     state=started