Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit ddb2a42

Browse files
MattiasGeessimonswine
authored andcommitted
Support ext4 and xfs for formatting empty filesystems
Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
1 parent 5798904 commit ddb2a42

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

puppet/modules/aws_ebs/manifests/mount.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
String $dest_path,
1818
String $device,
1919
Boolean $is_not_attached,
20-
Enum['xfs'] $filesystem = 'xfs',
20+
Enum['xfs', 'ext4'] $filesystem = 'xfs',
2121
){
2222
require ::aws_ebs
2323

puppet/modules/aws_ebs/templates/ensure-volume-formatted.service.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ After=<%= @attach_service_name %>
88
[Service]
99
Type=oneshot
1010
RemainAfterExit=yes
11-
ExecStart=<%= scope['aws_ebs::format_bin_path'] %> <%= @device %>
11+
ExecStart=<%= scope['aws_ebs::format_bin_path'] %> <%= @device %> <%= @filesystem %>
1212

1313
[Install]
1414
WantedBy=multiuser.target

puppet/modules/aws_ebs/templates/ensure_volume_formatted.sh.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
44
DEVICE=$1
5+
FILESYSTEM=$2
56

6-
blkid "${DEVICE}" || (wipefs -fa "${DEVICE}" && mkfs.xfs "${DEVICE}")
7+
blkid "${DEVICE}" || (wipefs -fa "${DEVICE}" && mkfs.${FILESYSTEM} "${DEVICE}")

0 commit comments

Comments
 (0)