Important

This role install an rsync daemon, rsync is not a secure protocol. All data are transmitted in clear and the login and password are encoded using 128 bit MD4, which is a weak encryption.

As a result, rsync should never be used over the internet (except for anonymous rsync of course).

If you need a secure rsync, use it over ssh.

Configuration

Define shared directories

You need to define a dictionary with the following informations:

rsyncd_shares:
  rsync_share_identifier:
    comment: "something clever" # this is optional
    path: "/the/shared/path"
    read_only: "true" # optional, the default is "true"
    auth_users: [ 'user1', 'user2' ]
    hosts_allow: [ '1.2.3.4', '5.6.7.8' ] # this is optional, the default value is '10.0.0.0/8'

Define the authentication informations

You need to define the login and their associated passwords in a list of dictionaries like that: rsyncd_secrets:

Connection

Anyone can list the available shares with this command:

rsync -t rsync://hostname

This will return the list of all the shares and their descriptions.

You can then test a sync with a command like that (this will ask for your password):

rsync -avn rsync://user1@rsync_share_identifier /tmp/.