gluster.gluster.geo_rep module – Manage geo-replication sessions
Note
This module is part of the gluster.gluster collection (version 1.0.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install gluster.gluster
.
To use it in a playbook, specify: gluster.gluster.geo_rep
.
Parameters
Parameter |
Comments |
---|---|
Action to be performed on geo-replication session. Choices:
|
|
The log level for the changelog. |
|
Sets a checkpoint with the given option. |
|
force the system to perform the action. |
|
Username to be used for the action being performed. |
|
The path to the geo-replication glusterfs log file. |
|
The log level for glusterfs processes. |
|
file deletion on the master will not trigger a delete operation on the slave. |
|
The path to the geo-replication log file. |
|
The log level for geo-replication. |
|
for recording the rsync performance in log files. |
|
Master volume name. |
|
The path of the meta volume mount point. |
|
The command to use for setting synchronizing method for the files. |
|
Additional options to rsync. |
|
Slave volume name. |
|
The SSH command to connect to the remote machine. |
|
Syncs acls to the Slave cluster. |
|
number of sync-jobs . |
|
Syncs extended attributes to the Slave cluster. |
|
timeout period. |
|
to use meta volume in Geo-replication. |
|
To use tar over ssh. |
|
deletes the existing master UID for the intermediate/slave node. |
Examples
- name: Create the geo-rep session
gluster.gluster.geo_rep:
action: create
mastervol: 10.70.42.122:mastervolume
slavevol: 10.70.43.48:slavevolume
force: true
georepuser: staff
- name: Starts the geo-rep session
gluster.gluster.geo_rep:
action: start
mastervol: 10.70.42.122:mastervolume
slavevol: 10.70.43.48:slavevolume
force: true
georepuser: staff
- name: Pause the geo-rep session
gluster.gluster.geo_rep:
action: pause
mastervol: 10.70.42.122:mastervolume
slavevol: 10.70.43.48:slavevolume
force: true
georepuser: staff
- name: Resume the geo-rep session
gluster.gluster.geo_rep:
action: resume
mastervol: 10.70.42.122:mastervolume
slavevol: 10.70.43.48:slavevolume
force: true
georepuser: staff
- name: Stop the geo-rep session
gluster.gluster.geo_rep:
action: stop
mastervol: 10.70.42.122:mastervolume
slavevol: 10.70.43.48:slavevolume
force: true
georepuser: staff
- name: Configures the geo-rep session
gluster.gluster.geo_rep:
action: config
mastervol: 10.70.42.122:mastervolume
slavevol: 10.70.43.48:slavevolume
gluster_log_file: /var/log/glusterfs/geo-replication/gluster.log
gluster_log_level: INFO
log_file: /var/log/glusterfs/geo-replication/file.log
log_level: INFO
changelog_log_level: INFO
ssh_command: SSH
rsync_command: rsync
use_tarssh: true
volume_id: 6a071cfa-b150-4f0b-b1ed-96ab5d4bd671
timeout: 60
sync_jobs: 3
ignore_deletes: 1
checkpoint: now
sync_acls: true
sync_xattr: true
log_rsync_performance: true
rsync_options: --compress-level=0
use_meta_volume: true
meta_volume_mnt: /var/run/gluster/shared_storage/
- name: Delete the geo-rep session
gluster.gluster.geo_rep:
action: delete
mastervol: 10.70.42.122:mastervolume
slavevol: 10.70.43.48:slavevolume
georepuser: staff
Authors
Sachidananda Urs (@sac)