forked from evolix/ansible-roles
remount-usr: use findmnt to find if usr is a readonly partition
This commit is contained in:
parent
80f8a94798
commit
2849039fad
|
@ -15,6 +15,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
* evolinux-base: many improvements for backup-server-state script
|
* evolinux-base: many improvements for backup-server-state script
|
||||||
|
* remount-usr: use findmnt to find if usr is a readonly partition
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
---
|
---
|
||||||
|
# findmnt returns 0 on hit, 1 on miss
|
||||||
|
# If the return code is higher than 1, it's a blocking failure
|
||||||
- name: "check if /usr is a read-only partition"
|
- name: "check if /usr is a read-only partition"
|
||||||
command: 'grep -E " /usr.*ro" /proc/mounts'
|
command: 'findmnt /usr --noheadings --options ro'
|
||||||
args:
|
|
||||||
warn: no
|
|
||||||
changed_when: False
|
changed_when: False
|
||||||
failed_when: False
|
failed_when: usr_partition.rc > 1
|
||||||
check_mode: no
|
check_mode: no
|
||||||
register: usr_partition
|
register: usr_partition
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue