Force updating repos with copy_from_local_path

Change-Id: If2275070b050a3e1bc43b88de66fd06b47c93a52
This commit is contained in:
Dmitry Tantsur 2020-09-09 12:56:02 +02:00
parent e026d0d110
commit c7f39356fb
3 changed files with 22 additions and 2 deletions

View File

@ -66,7 +66,13 @@
when: not copy_from_local_path | bool
- name: copy requirements from local path
command: cp -a {{ reqs_git_url }} {{ reqs_git_folder }} creates={{ reqs_git_folder }}
copy:
src: "{{ reqs_git_url }}/"
dest: "{{ reqs_git_folder }}/"
remote_src: yes
force: "{{ update_repos | bool }}"
owner: "{{ ansible_env.SUDO_USER | default(ansible_user_id) }}"
group: "{{ ansible_user_gid }}"
when: copy_from_local_path | bool
- include: prepare_libvirt.yml

View File

@ -35,7 +35,13 @@
- item.source_install | default(true) | bool
- name: "Copy from local path"
command: cp -a {{ item.git_url }} {{ item.git_folder }} creates={{ item.git_folder }}
copy:
src: "{{ item.git_url }}/"
dest: "{{ item.git_folder }}/"
remote_src: yes
force: "{{ update_repos | bool }}"
owner: "{{ ansible_env.SUDO_USER | default(ansible_user_id) }}"
group: "{{ ansible_user_gid }}"
loop: "{{ bifrost_install_sources }}"
when:
- copy_from_local_path | bool

View File

@ -0,0 +1,8 @@
---
fixes:
- |
Correctly updates repositories copied with ``copy_from_local_path``.
- |
When copying repositories using ``copy_from_local_path``, make sure
they are consistently owned by the local user. Previously some
repositories could end up owned by ``root``.