From 4d955b116c558786733e08488dda9ba456346a76 Mon Sep 17 00:00:00 2001 From: LinuxSquare Date: Thu, 27 Jun 2024 20:15:56 +0200 Subject: [PATCH] wip --- system/bootloader.ansible.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/system/bootloader.ansible.yml b/system/bootloader.ansible.yml index ce0d31a..f1f8d95 100644 --- a/system/bootloader.ansible.yml +++ b/system/bootloader.ansible.yml @@ -12,18 +12,18 @@ - efibootmgr state: present - name: Get current timestamp - command: | - 'CURRENT_SUBVOLUME=$(LC_ALL=C btrfs sub show / | LC_ALL=C grep Name: | tr -d \'[:space:]\'); TIMESTAMP_FORMAT=\'[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}_[[:digit:]]{2}-[[:digit:]]{2}-[[:digit:]]{2}\'; echo "$CURRENT_SUBVOLUME" | grep -Eo "$TIMESTAMP_FORMAT"' + shell: | + CURRENT_SUBVOLUME=$(LC_ALL=C btrfs sub show / | LC_ALL=C grep Name: | tr -d '[:space:]'); TIMESTAMP_FORMAT='[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}_[[:digit:]]{2}-[[:digit:]]{2}-[[:digit:]]{2}'; echo "$CURRENT_SUBVOLUME" | grep -Eo "$TIMESTAMP_FORMAT" register: CURRENT_SUBVOLUME_TIMESTAMP run_once: true - name: Get current timestamp human - command: | - 'CURRENT_SUBVOLUME_TIMESTAMP=\'{{ CURRENT_SUBVOLUME_TIMESTAMP.stdout }}\'; echo "${CURRENT_SUBVOLUME_TIMESTAMP:0:10} ${CURRENT_SUBVOLUME_TIMESTAMP:11:2}:${CURRENT_SUBVOLUME_TIMESTAMP:14:2}"' + shell: | + CURRENT_SUBVOLUME_TIMESTAMP='{{ CURRENT_SUBVOLUME_TIMESTAMP.stdout }}'; echo "${CURRENT_SUBVOLUME_TIMESTAMP:0:10} ${CURRENT_SUBVOLUME_TIMESTAMP:11:2}:${CURRENT_SUBVOLUME_TIMESTAMP:14:2}" register: CURRENT_SUBVOLUME_TIMESTAMP_HUMAN run_once: true - name: Get current kernel version - command: | - 'uname -r' + shell: | + uname -r register: KERNEL_VERSION run_once: true - name: mkinitfs config