19 lines
532 B
YAML
19 lines
532 B
YAML
---
|
|
- name: make gluster volume persistance
|
|
hosts: server
|
|
become: yes
|
|
tasks:
|
|
- name: copy to mnt
|
|
ansible.builtin.shell:
|
|
cmd: echo 'localhost:/vol /mnt glusterfs defaults,_netdev,backupvolfile-server=localhost 0 0' >> /etc/fstab
|
|
|
|
- name: mount glusterfs to mnt
|
|
ansible.builtin.shell:
|
|
cmd: mount.glusterfs localhost:/vol /mnt
|
|
|
|
- name: change ownership and group
|
|
file:
|
|
path: /mnt
|
|
owner: root
|
|
group: docker
|
|
recurse: yes |