Skip to content

Instantly share code, notes, and snippets.

@cmosguy
Created April 11, 2016 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmosguy/642c78219758323ea0624ffb0a694794 to your computer and use it in GitHub Desktop.
Save cmosguy/642c78219758323ea0624ffb0a694794 to your computer and use it in GitHub Desktop.
---
- include: "{{ deploy_build_before | default('../hooks/example.yml') }}"
tags: deploy-build-before
- name: Copy project templates
template:
src: "{{ item.src }}"
dest: "{{ deploy_helper.new_release_path }}/{{ item.dest }}"
mode: "{{ item.mode | default('0644') }}"
with_items: project_templates
- name: Check if project folders exist
stat:
path: "{{ deploy_helper.current_path }}/{{ item }}"
register: project_folder_paths
with_items: project_copy_folders
- name: Copy project folders
command: cp -rp {{ deploy_helper.current_path }}/{{ item.item }} {{ deploy_helper.new_release_path }}
with_items: project_folder_paths.results
when: item.stat.exists
- include: "{{ deploy_build_after | default('../hooks/example.yml') }}"
tags: deploy-build-after
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment