blob: 782a151af710f10aea450ce7c27b490819178023 [file] [log] [blame]
- name: The glusterfs registry volume is created
gluster_volume:
bricks: "{{ barrier_fs_dir }}/reg_brick1"
force: true
cluster: "{{groups.cluster | join(\",\")}}"
replicas: 3
name: registry_volume
state: present
run_once: true
- name: The glusterfs logging volume is created
gluster_volume:
bricks: "{{ barrier_fs_dir }}/log_brick1"
force: true
cluster: "{{groups.cluster | join(\",\")}}"
disperses: 3
name: logging_volume
state: present
run_once: true
- name: Start the gluster volumes
gluster_volume:
name: "{{ item }}"
state: started
with_items:
- registry_volume
- logging_volume
- name: The replicated registry filesystem is mounted
mount:
path: "{{ target_voltha_dir }}/registry_data"
src: "{{ inventory_hostname }}:/registry_volume"
fstype: glusterfs
opts: "defaults,_netdev,noauto,x-systemd.automount"
state: mounted
when: target == "cluster"
- name: The replicated logging filesystem is mounted on boot
mount:
path: "/var/log/voltha"
src: "{{ inventory_hostname }}:/logging_volume"
fstype: glusterfs
opts: "defaults,_netdev,noauto,x-systemd.automount"
state: mounted
when: target == "cluster"
tags: [cluster_host]