forked from evolix/ansible-roles
varnish remout /usr with read/write
This commit is contained in:
parent
4d9961b0f9
commit
274de55cc3
|
@ -4,6 +4,8 @@
|
||||||
name: libxml-parser-perl
|
name: libxml-parser-perl
|
||||||
tags: varnish
|
tags: varnish
|
||||||
|
|
||||||
|
- include: remount_usr_rw.yml
|
||||||
|
|
||||||
- name: Create plugin directory
|
- name: Create plugin directory
|
||||||
file:
|
file:
|
||||||
name: /usr/local/share/munin/
|
name: /usr/local/share/munin/
|
||||||
|
|
13
varnish/tasks/remount_usr_rw.yml
Normal file
13
varnish/tasks/remount_usr_rw.yml
Normal 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")
|
Loading…
Reference in a new issue