ansible-roles/remount-usr/tasks/main.yml
Patrick Marchand 90ba88e157
All checks were successful
gitea/ansible-roles/pipeline/head This commit looks good
Forgot to remove one of the warn: no occurences
2023-01-05 15:06:30 -05:00

16 lines
447 B
YAML

---
# 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"
command: '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"
command: 'mount -o remount,rw /usr'
changed_when: False
when: usr_partition.rc == 0
notify: remount usr