From 8e5916ac7ef161432abedd8c6948a8db2b5c8169 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Wed, 26 Sep 2018 13:04:38 +0200 Subject: space_server: kernel: better cmdline template --- roles/space_server/templates/cmdline.j2 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'roles/space_server/templates') diff --git a/roles/space_server/templates/cmdline.j2 b/roles/space_server/templates/cmdline.j2 index 36b1e15..d3bd2e7 100644 --- a/roles/space_server/templates/cmdline.j2 +++ b/roles/space_server/templates/cmdline.j2 @@ -1,5 +1,8 @@ -{% if ansible_distribution_release == 'Rawhide' %} -console=ttyS0,115200n8 ro root={{ root.device }} rootfstype=btrfs ro rootflags={{ root.options|regex_replace('noatime,','') }},subvol=/rawhide rootwait audit=0 +{% if 'subvolume' in root %} +{% set subvol = root.subvolume %} +{% elif ansible_distribution_release == 'Rawhide' %} +{% set subvol = '/rawhide' %} {% else %} -console=ttyS0,115200n8 ro root={{ root.device }} rootfstype=btrfs ro rootflags={{ root.options|regex_replace('noatime,','') }},subvol=/{{ ansible_distribution.lower() }}{{ ansible_distribution_version }} rootwait audit=0 +{% set subvol = '/%s%s' % (ansible_distribution.lower(), ansible_distribution_version) %} {% endif %} +console=ttyS0,115200n8 ro root={{ root.device }} rootfstype=btrfs ro rootflags={{ root.options|regex_replace('noatime,','') }},subvol={{ subvol }} rootwait audit=0 -- cgit v1.2.1