summaryrefslogtreecommitdiff
path: root/roles/kubernetes/base/tasks/lvm.yml
blob: 3ef36e89134d10d8edbb64c2f4de17be741fb7ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
- name: create logical volume
  lvol:
    vg: "{{ kubelet_lvm.vg }}"
    lv: "{{ kubelet_lvm.lv }}"
    size: "{{ kubelet_lvm.size }}"

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

- name: mount filesytem
  mount:
    src: "/dev/mapper/{{ kubelet_lvm.vg | replace('-', '--') }}-{{ kubelet_lvm.lv | replace('-', '--') }}"
    path: /var/lib/kubelet
    fstype: "{{ kubelet_lvm.fs }}"
    state: mounted