ansible-roles/remount-usr/tasks/main.yml
Jérémy Lecour b9b0183ec5 remount-usr: mount doesn't report a change
It is arguable that this is a real change or not,
but in practice we have playbooks that report changes only for this and
it's very fun to scroll back each time to see if it's remount-usr or
a "real" change.
2018-08-06 15:01:52 +02:00

18 lines
367 B
YAML

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