Commit f651cb81 by Feanil Patel

Don't remove the git repos just exclude them from the tar file.

parent 92a2d6c3
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
dest="{{ edxapp_course_data_dir }}/{{ item.repo_name }}" dest="{{ edxapp_course_data_dir }}/{{ item.repo_name }}"
version="{{ item.version }}" version="{{ item.version }}"
accept_hostkey=True accept_hostkey=True
depth=1
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
environment: environment:
GIT_SSH: "{{ edxapp_git_ssh }}" GIT_SSH: "{{ edxapp_git_ssh }}"
...@@ -58,13 +59,8 @@ ...@@ -58,13 +59,8 @@
with_items: EDXAPP_XML_COURSES with_items: EDXAPP_XML_COURSES
when: item.disposition == "import" when: item.disposition == "import"
- name: delete .git repos
file: path="{{ edxapp_course_data_dir }}/{{ item.repo_name }}/.git" state=absent
with_items: EDXAPP_XML_COURSES
when: item.disposition == "on disk" or item.disposition == "no static import"
- name: create an archive of course data and course static dirs - name: create an archive of course data and course static dirs
shell: tar czf /tmp/static_course_content.tar.gz -C {{ edxapp_data_dir }} {{ edxapp_course_data_dir|basename }} {{ edxapp_course_static_dir|basename }} shell: tar czf /tmp/static_course_content.tar.gz -C {{ edxapp_data_dir }} --exclude ".git" {{ edxapp_course_data_dir|basename }} {{ edxapp_course_static_dir|basename }}
- name: upload archive to s3 - name: upload archive to s3
s3: > s3: >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment