You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
497 B

# 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"
cmd: 'findmnt /usr --noheadings --options ro'
changed_when: False
failed_when: usr_partition.rc > 1
check_mode: no
register: usr_partition
- name: "mount /usr in rw"
cmd: 'mount -o remount,rw /usr'
changed_when: False
when: usr_partition.rc == 0
notify: remount usr