openstack-ansible-repo_build/tasks/repo_clone_git.yml
Travis Truman 42f6f1a103 Only clone sources when the script changes
Minor change to reduce the run time of multiple
invocations of the role and add idempotence to this part
of the repo build process.

No longer deleting the clone script also helps in troubleshooting
any repo build issues that may arise.

Change-Id: I27ec05448da7981fb81b5c319f76374548279b3e
2016-09-30 15:54:44 -04:00

31 lines
991 B
YAML

---
# Copyright 2015, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Create clone process script
template:
src: "op-clone-script.sh.j2"
dest: "/opt/op-clone-script.sh"
register: repo_clone_script_template
tags:
- repo-clone-repos
- name: Run clone process script
shell: "bash /opt/op-clone-script.sh"
become: yes
become_user: "{{ repo_build_service_user_name }}"
when: repo_clone_script_template | changed
tags:
- repo-clone-repos