- set_fact:
    dest: "{{ ansible_user }}@{{ ansible_fqdn }}:{{ web_dir }}"

- name: ensure {{ web_dir }} exists
  file:
    path: "{{ web_dir }}"
    state: directory
    owner: "{{ ansible_user }}"
    group: "{{ ansible_user }}"
    mode: "0755"

# - name: sync migrate folder
#   local_action: command rsync -rz --delete {{ build_dir }}/migrate/ {{ dest }}/migrate/

- name: sync vendor folder
  local_action: command rsync -rz --delete --links {{ build_dir }}/vendor/ {{ dest }}/vendor/

- name: sync config folder
  local_action: command rsync -rz --delete {{ build_dir }}/config/ {{ dest }}/config/

- name: sync web folder
  local_action: command rsync -rz --delete --exclude sites/default/files {{ build_dir }}/web/ {{ dest }}/web/
