Files
bifrost/playbooks/roles/bifrost-prep-for-install/tasks/main.yml
Riccardo Pittau e4d0325b2f Fix error 601
Don't compare to literal True/False

Change-Id: I671978ac95de03d80b059d42f188e9fc9aecb4b4
2020-09-02 11:41:11 +02:00

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