Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
6570c919
Verified
Commit
6570c919
authored
Oct 04, 2021
by
Evangelos Foutras
🐱
Browse files
common: group mounts by uuid and scrub only the first
sort + groupby fanciness by
@klausenbusk
.
parent
cb339991
Pipeline
#11701
passed with stage
in 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
roles/common/tasks/main.yml
View file @
6570c919
...
...
@@ -37,8 +37,10 @@
-
name
:
start and enable btrfs scrub timer
service
:
name=btrfs-scrub@{{ '-' if (item.mount | length == 1) else (item.mount.split("/", 1)[1] | replace("/", "-")) }}.timer enabled=yes state=started
loop
:
"
{{
ansible_mounts
}}"
when
:
"
item.fstype
==
'btrfs'
and
item.mount
!=
'/var/lib/docker/btrfs'
and
'backup'
not
in
item.mount"
loop
:
"
{{
ansible_mounts
|
sort(attribute='mount')
|
groupby('uuid')
|
map(attribute=1)
|
map('first')
}}"
when
:
-
item.fstype == 'btrfs'
-
not 'backup' in item.mount
-
name
:
install mlocate
pacman
:
name=mlocate state=present
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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