summaryrefslogtreecommitdiff
path: root/roles/emc-stats/tasks/main.yml
blob: 69c7af01501461af352d62d958752feb1df2366d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- name: create volume group
  when: emc_stats_lvm.pvs is defined
  lvg:
    vg: "{{ emc_stats_lvm.vg }}"
    pvs: "{{ emc_stats_lvm.pvs }}"

- name: create logical volume
  lvol:
    vg: "{{ emc_stats_lvm.vg }}"
    lv: "{{ emc_stats_lvm.lv }}"
    size: "{{ emc_stats_lvm.size }}"

- name: create filesystem
  filesystem:
    fstype: "{{ emc_stats_lvm.fs }}"
    dev: "/dev/mapper/{{ emc_stats_lvm.vg | replace('-', '--') }}-{{ emc_stats_lvm.lv | replace('-', '--') }}"

- name: mount filesytem
  mount:
    src: "/dev/mapper/{{ emc_stats_lvm.vg | replace('-', '--') }}-{{ emc_stats_lvm.lv | replace('-', '--') }}"
    path: /srv/stats
    fstype: "{{ emc_stats_lvm.fs }}"
    state: mounted

# needed for elasticsearch
- name: increase vm.max_map_count
  sysctl:
    name: vm.max_map_count
    value: 262144