�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
Z
d d l m Z d d
l
m Z d d l m Z d a d � Z d � Z d � Z d � Z d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys�
---
module: gluster_heal_info
short_description: Gather information on self-heal or rebalance status
author: "Devyani Kota (@devyanikota)"
version_added: "2.8"
description:
- Gather facts about either self-heal or rebalance status.
- This module was called C(gluster_heal_facts) before Ansible 2.9, returning C(ansible_facts).
Note that the M(gluster_heal_info) module no longer returns C(ansible_facts)!
options:
name:
description:
- The volume name.
required: true
aliases: ['volume']
status_filter:
default: "self-heal"
choices: ["self-heal", "rebalance"]
description:
- Determines which facts are to be returned.
- If the C(status_filter) is C(self-heal), status of self-heal, along with the number of files still in process are returned.
- If the C(status_filter) is C(rebalance), rebalance status is returned.
requirements:
- GlusterFS > 3.2
s�
- name: Gather self-heal facts about all gluster hosts in the cluster
gluster_heal_info:
name: test_volume
status_filter: self-heal
register: self_heal_status
- debug:
var: self_heal_status
- name: Gather rebalance facts about all gluster hosts in the cluster
gluster_heal_info:
name: test_volume
status_filter: rebalance
register: rebalance_status
- debug:
var: rebalance_status
s�
name:
description: GlusterFS volume name
returned: always
type: str
status_filter:
description: Whether self-heal or rebalance status is to be returned
returned: always
type: str
heal_info:
description: List of files that still need healing process
returned: On success
type: list
rebalance_status:
description: Status of rebalance operation
returned: On success
type: list
N( t
AnsibleModule( t to_native( t LooseVersiont c K` s� t d g } | j | � yf t j | | � \ } } } | d k r~ t j d d d j | � | | pg | f d t j � � n WnH t k
r� } t j d d d j | � t | � f d t j � � n X| S( Ns
--mode=scripti t msgs. error running gluster (%s) command (rc=%d): %st t exceptions&