Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai3
float
Commits
bc5ecafd
Commit
bc5ecafd
authored
Jan 16, 2021
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an 'enable_lvm' configuration variable for volumes
parent
bfaf24fa
Pipeline
#10766
passed with stage
in 2 minutes and 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
roles/volumemgr/defaults/main.yml
roles/volumemgr/defaults/main.yml
+5
-0
roles/volumemgr/tasks/volume.yml
roles/volumemgr/tasks/volume.yml
+3
-0
No files found.
roles/volumemgr/defaults/main.yml
0 → 100644
View file @
bc5ecafd
---
# Whether to create volumes as LVs.
enable_lvm
:
false
roles/volumemgr/tasks/volume.yml
View file @
bc5ecafd
...
...
@@ -20,12 +20,14 @@
lv
:
"
{{
lv_name
}}"
size
:
"
{{
volume.size
|
default('10g')
}}"
shrink
:
false
when
:
enable_lvm
-
name
:
"
Create
a
filesystem
on
{{
lv_name
}}"
filesystem
:
dev
:
"
{{
lv_dev
}}"
fstype
:
ext4
register
:
lv_mkfs
when
:
enable_lvm
-
name
:
"
Add
the
/etc/fstab
entry
for
{{
lv_name
}}"
mount
:
...
...
@@ -34,6 +36,7 @@
opts
:
"
rw,noatime{%
if
volume.mount_opts
is
defined
%},{{
volume.mount_opts
}}{%
endif
%}"
fstype
:
ext4
state
:
mounted
when
:
enable_lvm
# Set permissions again if we have created the filesystem.
-
name
:
"
Fix
permissions
for
{{
volume.path
}}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment