Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ics-ans-role-rsync
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ics-ansible-galaxy
ics-ans-role-rsync
Commits
66f43353
Commit
66f43353
authored
5 years ago
by
Te-Hung Tseng
Browse files
Options
Downloads
Patches
Plain Diff
Reconfigured config share for backup strategy
parent
8001869b
No related branches found
No related tags found
1 merge request
!3
Reconfigured config share for backup strategy
Pipeline
#16162
passed
5 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+25
-13
25 additions, 13 deletions
README.md
defaults/main.yml
+21
-13
21 additions, 13 deletions
defaults/main.yml
templates/etc-rsyncd-conf.j2
+45
-7
45 additions, 7 deletions
templates/etc-rsyncd-conf.j2
with
91 additions
and
33 deletions
README.md
+
25
−
13
View file @
66f43353
...
...
@@ -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
-------
...
...
This diff is collapsed.
Click to expand it.
defaults/main.yml
+
21
−
13
View file @
66f43353
---
# 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
This diff is collapsed.
Click to expand it.
templates/etc-rsyncd-conf.j2
+
45
−
7
View file @
66f43353
# {{ 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 %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment