Skip to content
Snippets Groups Projects
Commit 66f43353 authored by Te-Hung Tseng's avatar Te-Hung Tseng
Browse files

Reconfigured config share for backup strategy

parent 8001869b
No related branches found
No related tags found
1 merge request!3Reconfigured config share for backup strategy
Pipeline #16162 passed
......@@ -34,20 +34,32 @@ Example Playbook
Role Variables
--------------
```yaml
---
# defaults file for rsync-server
rsync_server_uid: root
rsync_server_gid: root
rsync_server_chroot: true
rsync_server_symlinks: true
rsync_server_list: false
rsync_server_exclude_compress: "*.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2"
rsync_server_log_path: /var/log/rsyncd.log
rsync_server_pid_path: /var/run/rsyncd.pid
rsync_server_readonly: false
rsync_server_shares:
- name: replaceme
path: /foo/lab/bar-01
hosts_allow: 10.4.3.15, 172.30.4.0/24, learning-01.cslab.esss.lu.se
comment: dummy client to be replaced in CS-entry
read_only: false
uid: nobody
gid: 13
excludes: "lost+found/ test/ .*"
timeout: 600
- name: client2
path: /learning/lab/learning-02
hosts_allow: learning-01.cslab.esss.lu.se learning-02.cslab.esss.lu.se
Defaults: `defaults/main.yml`
- `rsync_server_timeout`: Timeout for connections, default `300` seconds
- `rsync_server_max_connections`: Maximum number of connections, default `10`
- `rsync_server_shares`: A list of dictionaries of shares with fields:
- `name`: The published name of the share, required
- `path`: Filesystem path of the share, required
- `comment`: Description of the share, default is the same as `name`
- `readonly`: Whether the share is read-only, default `True`
- `uid`: User name or ID when access the share, default `nobody`
- `gid`: Group name or ID when access the share, default `nobody`
- `excludes`: A list of exclusions, default `['lost+found', '.*']`
- `host_allow`: IPADDRESS or IPADDRESS/MASK, default `*`
License
-------
......
---
# defaults file for rsync-server
root: /icslab/rsync
rsync_server_timeout: 300
rsync_server_max_connections: 10
rsync_server_uid: root
rsync_server_gid: root
rsync_server_chroot: true
rsync_server_symlinks: true
rsync_server_list: false
rsync_server_exclude_compress: "*.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2"
rsync_server_log_path: /var/log/rsyncd.log
rsync_server_pid_path: /var/run/rsyncd.pid
rsync_server_readonly: false
rsync_server_shares:
- name: cataniapc1
path: "{{ root }}/cataniapc1"
readonly: false
- name: cataniapc2
path: "{{ root }}/cataniapc2"
readonly: false
- name: icsv-mgmnt-01
path: "{{ root }}/icsv-mgmnt-01"
readonly: false
host_allow: 10.4.3.15
- name: replaceme
path: /foo/lab/bar-01
hosts_allow: 10.4.3.15, 172.30.4.0/24, learning-01.cslab.esss.lu.se
comment: dummy client to be replaced in CS-entry
read_only: false
uid: nobody
gid: 13
excludes: "lost+found/ test/ .*"
timeout: 600
- name: client2
path: /learning/lab/learning-02
hosts_allow: learning-01.cslab.esss.lu.se learning-02.cslab.esss.lu.se
# {{ ansible_managed }}
[global]
timeout = {{ rsync_server_timeout }}
max connections = {{ rsync_server_max_connections }}
log file = /var/log/rsyncd/rsyncd.log
# See rsyncd.conf man page for more options.
# configuration example:
# uid = nobody
# gid = nobody
# use chroot = yes
# max connections = 4
# pid file = /var/run/rsyncd.pid
# exclude = lost+found/
# transfer logging = yes
# timeout = 900
# ignore nonreadable = yes
# dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2
# [ftp]
# path = /home/ftp
# comment = ftp export area
uid = {{ rsync_server_uid }}
gid = {{ rsync_server_gid }}
use chroot = {{ rsync_server_chroot }}
log file = {{ rsync_server_log_path }}
pid file = {{ rsync_server_pid_path }}
dont compress = {{ rsync_server_exclude_compress }}
munge symlinks = {{ rsync_server_symlinks }}
list = {{ rsync_server_list }} # If a client can see a list of modules available, default is true
read only = {{ rsync_server_readonly }}
timeout = {{ rsync_server_timeout | default('0') }}
max connections = {{ rsync_server_max_connections | default('0') }}
{% for share in rsync_server_shares %}
[{{ share.name }}]
path = {{ share.path }}
hosts allow = {{ share.hosts_allow | default('*') }}
comment = {{ share.comment | default(share.path) }}
read only = {{ share.readonly | default(True) | ternary('true', 'false' ) }}
{% if share.readonly is defined %}
read only = {{ share.readonly }}
{% endif %}
{% if share.uid is defined %}
uid = {{ share.uid | default('nobody') }}
{% endif %}
{% if share.gid is defined %}
gid = {{ share.gid | default('nobody') }}
exclude = {{ share.excludes | default(['lost+found', '.*']) | join(' ') }}
hosts allow = {{ share.host_allow | default('*') }}
{% endif %}
{% if share.excludes is defined %}
exclude = {{ share.excludes }}
{% endif %}
{% if share.timeout is defined %}
timeout = {{ share.timeout }}
{% endif %}
{% endfor %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment