Updated the clone process to exclude unneeded files

This commit changes the clone process to properly exclude files from the repo
clone play/task. This also ensures that when this play is used that all local
repos are an exact match to what is upstream.

Change-Id: I840997d6778f40a9007bce18df792c6b0c69c5eb
Closes-Bug: #1468567
This commit is contained in:
kevin 2015-06-24 22:42:41 -05:00
parent 1f49e06393
commit 955c851cdd

View File

@ -26,12 +26,18 @@
- name: Sync the upstream repo(s)
shell: |
rsync -avzlHAX \
--exclude="{{ mirror_excludes }}" \
{{ mirror_excludes }} \
{{ mirror_source_host }}::{{ mirror_name }} {{ mirror_path }}
sudo: yes
sudo_user: "{{ repo_service_user_name }}"
vars:
mirror_excludes: "{{ repo_mirror_excludes|default('repos/* mirror/* rpcgit/* openstackgit/*') }}"
repo_mirror_excludes:
- "/repos"
- "/mirror"
- "/rpcgit"
- "/openstackgit"
- "/python_packages"
mirror_excludes: "{% for i in repo_mirror_excludes %} --exclude={{ i }} {% endfor %}"
mirror_path: "{{ repo_service_home_folder }}/repo"
mirror_name: "{{ repo_mirror_name|default('openstack_mirror') }}"
mirror_source_host: "{{ repo_mirror_source_host|default('rpc-repo.rackspace.com') }}"