Documentation

    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