ansible-roles/remount-usr/tasks/main.yml

17 lines
345 B
YAML
Raw Normal View History

---
2017-11-15 12:21:30 +01:00
- name: "check if /usr is a read-only partition"
command: 'grep -E " /usr.*ro" /proc/mounts'
args:
warn: no
changed_when: False
failed_when: False
check_mode: no
register: usr_partition
2017-11-15 12:21:30 +01:00
- name: "mount /usr in rw"
command: 'mount -o remount,rw /usr'
args:
warn: no
when: usr_partition.rc == 0
notify: remount usr