This commit is contained in:
parent
e9f63d1d08
commit
f780b3d8e3
1 changed files with 26 additions and 0 deletions
|
|
@ -4,6 +4,32 @@
|
||||||
- name: Include vars for {{ ansible_os_family }}
|
- name: Include vars for {{ ansible_os_family }}
|
||||||
include_vars: "{{ ansible_os_family }}.yml"
|
include_vars: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
|
- name: Create thin volumes for containers
|
||||||
|
lvol:
|
||||||
|
vg: "{{ item.vg }}"
|
||||||
|
lv: "{{ item.name }}"
|
||||||
|
thinpool: kubernetes
|
||||||
|
size: "{{ item.size }}"
|
||||||
|
with_items:
|
||||||
|
- { name: var_lib_containers, vg: vg_sys, size: 10g, mount_point: /var/lib/containers, mount_opts: "discard"}
|
||||||
|
|
||||||
|
- name: create file system on containers lv
|
||||||
|
filesystem:
|
||||||
|
fstype: ext4
|
||||||
|
dev: "/dev/{{ item.vg }}/{{ item.name }}"
|
||||||
|
with_items:
|
||||||
|
- { name: var_lib_containers, vg: vg_sys, size: 10g, mount_point: /var/lib/containers, mount_opts: "discard"}
|
||||||
|
|
||||||
|
- name: mount logical volumes
|
||||||
|
mount:
|
||||||
|
name: "{{ item.mount_point }}"
|
||||||
|
src: "/dev/{{ item.vg }}/{{ item.name }}"
|
||||||
|
fstype: ext4
|
||||||
|
opts: "{{ item.mount_opts }}"
|
||||||
|
state: mounted
|
||||||
|
with_items:
|
||||||
|
- { name: var_lib_containers, vg: vg_sys, size: 10g, mount_point: /var/lib/containers, mount_opts: "discard"}
|
||||||
|
|
||||||
- name: Configuring kernel module to be load on boot
|
- name: Configuring kernel module to be load on boot
|
||||||
template:
|
template:
|
||||||
src: "etc/modules-load.d/{{ item }}.conf.j2"
|
src: "etc/modules-load.d/{{ item }}.conf.j2"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue