wip
This commit is contained in:
parent
e82cb05b69
commit
4d955b116c
1 changed files with 6 additions and 6 deletions
|
@ -12,18 +12,18 @@
|
||||||
- efibootmgr
|
- efibootmgr
|
||||||
state: present
|
state: present
|
||||||
- name: Get current timestamp
|
- name: Get current timestamp
|
||||||
command: |
|
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"'
|
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
|
register: CURRENT_SUBVOLUME_TIMESTAMP
|
||||||
run_once: true
|
run_once: true
|
||||||
- name: Get current timestamp human
|
- name: Get current timestamp human
|
||||||
command: |
|
shell: |
|
||||||
'CURRENT_SUBVOLUME_TIMESTAMP=\'{{ CURRENT_SUBVOLUME_TIMESTAMP.stdout }}\'; echo "${CURRENT_SUBVOLUME_TIMESTAMP:0:10} ${CURRENT_SUBVOLUME_TIMESTAMP:11:2}:${CURRENT_SUBVOLUME_TIMESTAMP:14:2}"'
|
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
|
register: CURRENT_SUBVOLUME_TIMESTAMP_HUMAN
|
||||||
run_once: true
|
run_once: true
|
||||||
- name: Get current kernel version
|
- name: Get current kernel version
|
||||||
command: |
|
shell: |
|
||||||
'uname -r'
|
uname -r
|
||||||
register: KERNEL_VERSION
|
register: KERNEL_VERSION
|
||||||
run_once: true
|
run_once: true
|
||||||
- name: mkinitfs config
|
- name: mkinitfs config
|
||||||
|
|
Loading…
Reference in a new issue