gluster: Fix redploying glusterfs peers
This commit is contained in:
parent
0404bafac2
commit
4547044a07
1 changed files with 8 additions and 0 deletions
|
@ -54,7 +54,12 @@
|
||||||
gluster_peer:
|
gluster_peer:
|
||||||
state: present
|
state: present
|
||||||
nodes: "{{ item }}"
|
nodes: "{{ item }}"
|
||||||
|
when:
|
||||||
|
- item != inventory_hostname
|
||||||
with_items: "{{ groups[glusterfs_group] }}"
|
with_items: "{{ groups[glusterfs_group] }}"
|
||||||
|
delegate_to: >-
|
||||||
|
{% set hosts = groups[glusterfs_group] -%}
|
||||||
|
{{ hosts | reject('equalto', inventory_hostname) | list | first }}
|
||||||
|
|
||||||
- name: configure volume
|
- name: configure volume
|
||||||
gluster_volume:
|
gluster_volume:
|
||||||
|
@ -72,3 +77,6 @@
|
||||||
}
|
}
|
||||||
run_once: true
|
run_once: true
|
||||||
notify: restart glusterfs volume
|
notify: restart glusterfs volume
|
||||||
|
delegate_to: >-
|
||||||
|
{% set hosts = groups[glusterfs_group] -%}
|
||||||
|
{{ hosts | reject('equalto', inventory_hostname) | list | first }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue