43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
|
|
#
|
|
# 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: ensure installation root folder exists
|
|
become: yes
|
|
file:
|
|
state: directory
|
|
dest: "{{ git_root }}"
|
|
owner: "{{ ansible_user_id }}"
|
|
group: "{{ ansible_user_gid }}"
|
|
|
|
- name: "Download via GIT"
|
|
git:
|
|
dest: "{{ item.git_folder }}"
|
|
force: "{{ force_update_repos | bool }}"
|
|
repo: "{{ item.git_url }}"
|
|
version: "{{ item.git_branch }}"
|
|
update: "{{ update_repos | bool }}"
|
|
clone: yes
|
|
loop: "{{ bifrost_install_sources }}"
|
|
when:
|
|
- not copy_from_local_path | bool
|
|
- item.source_install | default(true) | bool
|
|
|
|
- name: "Copy from local path"
|
|
command: cp -a {{ item.git_url }} {{ item.git_folder }} creates={{ item.git_folder }}
|
|
loop: "{{ bifrost_install_sources }}"
|
|
when:
|
|
- copy_from_local_path | bool
|
|
- item.source_install | default(true) | bool
|