serverdeploy-playbook.yml 381 B

123456789101112131415
  1. ---
  2. - hosts: "{{ server }}"
  3. tasks:
  4. - name: create versioned directory
  5. file: path={{ deploy_folder }} state=directory
  6. - name: sync files to folder
  7. synchronize:
  8. src: "{{ project_folder}}/"
  9. dest: "{{ deploy_folder }}/"
  10. archive: yes
  11. delete: yes
  12. rsync_opts:
  13. - "--exclude=.git"
  14. - "--exclude=node_modules"