Install rsync-server package.
This role requires Ansible 2.8 or higher, and platform requirements are listed in the metadata file.
This role use Molecule to run tests.
Local and Github Actions tests run tests on Docker by default. See molecule documentation to use other backend.
Currently, tests are done on:
- CentOS 7
- CentOS 8
- Debian Buster
- Debian Stretch
- Ubuntu Bionic
- Ubuntu Focal
and use:
- Ansible 2.8.x
- Ansible 2.9.x
$ tox
You can also configure molecule options and molecule command using environment variables:
MOLECULE_OPTIONS
Default: "--debug"MOLECULE_COMMAND
Default: "test"
$ MOLECULE_OPTIONS='' MOLECULE_COMMAND=converge tox
# Packages and repositories
rsync_server_repository_cache_valid_time: 3600
rsync_server_packages: "{{ _rsync_server_packages }}"
# User and group management
rsync_server_group:
name: 'rsync'
rsync_server_user:
name: 'rsync'
group: "{{ rsync_server_group.name }}"
home: '/dev/null'
shell: '/bin/false'
# Main configuration
rsync_server_config_main:
global: |
uid = rsync
gid = rsync
modules: []
# Default daemon configuration
rsync_server_config_default: |
RSYNC_ENABLE=false
RSYNC_OPTS=''
RSYNC_NICE=''
# Service management
rsync_server_service: "{{ _rsync_server_service }}"
# Packages and repositories
_rsync_server_packages:
- name: 'rsync'
# Paths
_rsync_server_paths:
files:
default:
path: '/etc/default/rsync'
main_config:
path: '/etc/rsyncd.conf'
# Service management
_rsync_server_service:
name: 'rsync'
Follow this example:
rsync_server_config:
global: |
uid: 'rsync'
gid: 'rsync'
modules:
- name: 'my_sync'
config: |
path = /data
comment = Example sync
read only = false
rsync_users:
- name: 'foo'
password: 'bar'
None
- hosts: servers
roles:
- { role: infOpen.rsync-server }
MIT
Alexandre Chaussier (for Infopen company)
- https://www.infopen.pro
- a.chaussier [at] infopen.pro