remount: Only remount if needed
Skip remounting filesystems that are already in the specified state.ntfy
parent
689d53abfd
commit
98401b3c1e
|
@ -9,12 +9,12 @@
|
||||||
tasks:
|
tasks:
|
||||||
- name: remount filesystems
|
- name: remount filesystems
|
||||||
command:
|
command:
|
||||||
mount -oremount,{{ remount_state }} {{ item }}
|
mount -oremount,{{ remount_state }} {{ item.mount }}
|
||||||
warn=false
|
warn=false
|
||||||
with_items: >-
|
with_items: >-
|
||||||
{{
|
{{
|
||||||
ansible_mounts
|
ansible_mounts
|
||||||
| selectattr('mount', 'in', remount_fs)
|
| selectattr('mount', 'in', remount_fs)
|
||||||
| map(attribute='mount')
|
|
||||||
| list
|
| list
|
||||||
}}
|
}}
|
||||||
|
when: not item.options.startswith(remount_state)
|
||||||
|
|
Loading…
Reference in New Issue