evolinux-base: remount /usr when needed

This commit is contained in:
Jérémy Lecour 2017-05-23 14:55:31 +02:00 committed by Jérémy Lecour
parent 6e104d8689
commit c66438a2a3
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,13 @@
---
- name: Get mount options for partitions
shell: "mount | grep 'on /usr type'"
args:
warn: no
register: mount
changed_when: False
failed_when: False
when: not ansible_check_mode
- name: Remount /usr if it is a partition and it is not mounted in rw
command: "mount -o remount,rw /usr"
when: mount.rc == 0 and not mount.stdout_lines.0 | search("rw")

View File

@ -41,6 +41,8 @@
# TODO : find a way to force the console-data configuration
# non-interactively (like tzdata ↑)
- include: remount_usr_rw.yml
- name: Setting vim as default editor
alternatives:
name: editor