ansible/resize.yml: playbook for /data resizing
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
78a2175c08
commit
67ff99c4d1
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
- name: Resize /data volume
|
||||
hosts: all
|
||||
serial: '{{ serial|default(1) }}'
|
||||
tasks:
|
||||
- systemd: name=docker state=stopped
|
||||
- command: awk '/\/data/{print $1}' /etc/mtab
|
||||
register: device_path
|
||||
- name: umount /docker
|
||||
command: umount /docker
|
||||
- name: umount /data
|
||||
command: umount /data
|
||||
- name: e2fsck {{ device_path.stdout }}
|
||||
command: e2fsck -pf {{ device_path.stdout }}
|
||||
- name: resize2fs {{ device_path.stdout }}
|
||||
command: resize2fs {{ device_path.stdout }}
|
||||
- name: mount /data
|
||||
command: mount /data
|
||||
- name: mount /docker
|
||||
command: mount /docker
|
||||
- systemd: name=docker state=started
|
Loading…
Reference in New Issue