-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
converge.yml
47 lines (45 loc) · 1.29 KB
/
converge.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
- name: Converge
hosts: all
become: true
gather_facts: true
pre_tasks:
# For testing in containers, a loopback device is created in `prepare.yml`.
# The device created in `prepare.yml` is picked up here.
# Normally you would point to /dev/sd*.
- name: Read loop device from disk
ansible.builtin.slurp:
src: /loopback-devicename.txt
register: loopback_devicename
roles:
- role: ansible-role-storage
# Partitioning a loopback device is not supported by parted.
# storage_partitions:
# - name: "{{ loopback_devicename.content | b64decode }}"
# number: 1
# part_end: 100%
# label: gpt
storage_volumegroups:
- name: data
devices:
- "{{ loopback_devicename.content | b64decode }}"
size: 4
storage_volumes:
- name: test1
vg: data
size: 1G
opts: --zero n
storage_filesystems:
- name: /dev/data/test1
fstype: xfs
# Mounting is not idempotent for:
# - debian:bullseye
# - ubuntu:focal
# - ubuntu:bionic
# storage_mounts:
# - name: /mnt/test
# src: /dev/data/test1
# fstype: xfs
# owner: root
# group: root
# mode: "0755"