Documentation

    PLEASE NOTE: This document applies to latest version and not to the latest stable release v2.21

    Documentation for other releases can be found by using the version selector in the top right of any doc page.

    synchronize

    Wrap rsync to synchronize files.

    Attributes

    check_mode:
      support: none
    

    Parameters

    Parameter Required Type Values Description
    src true string   Path on the source host that will be synchronized.
    dest true string   Path on the destination host that will be synchronized.
    delete   boolean   Delete files in dest that don’t exist in src. [default: false]
    rsync_opts   array   Additional rsync options.

    Examples

    - synchronize:
        src: ./dist/
        dest: /opt/app/
    
    - synchronize:
        src: ./src/
        dest: /var/www/html/
        delete: true
        rsync_opts:
          - --exclude=.git
          - --chmod=D755,F644