Ensure that repositories are owned by the running users
Currently requirements may end up owned by root. Change-Id: I563af83ddea9fe3392a486c049607151f361faa2
This commit is contained in:
parent
460cd00dce
commit
0ef62ca2dc
@ -53,6 +53,14 @@
|
||||
clone: yes
|
||||
when: not copy_from_local_path | bool
|
||||
|
||||
- name: ensure ownership of requirements
|
||||
file:
|
||||
path: "{{ reqs_git_folder }}"
|
||||
owner: "{{ ansible_env.SUDO_USER | default(ansible_user_id) }}"
|
||||
group: "{{ ansible_user_gid }}"
|
||||
recurse: yes
|
||||
when: not copy_from_local_path | bool
|
||||
|
||||
- name: copy requirements from local path
|
||||
copy:
|
||||
src: "{{ reqs_git_url }}/"
|
||||
|
@ -34,6 +34,17 @@
|
||||
- not copy_from_local_path | bool
|
||||
- item.source_install | default(true) | bool
|
||||
|
||||
- name: "Ensure ownership of repositories"
|
||||
file:
|
||||
path: "{{ item.git_folder }}"
|
||||
owner: "{{ ansible_env.SUDO_USER | default(ansible_user_id) }}"
|
||||
group: "{{ ansible_user_gid }}"
|
||||
recurse: yes
|
||||
loop: "{{ bifrost_install_sources }}"
|
||||
when:
|
||||
- not copy_from_local_path | bool
|
||||
- item.source_install | default(true) | bool
|
||||
|
||||
- name: "Copy from local path"
|
||||
copy:
|
||||
src: "{{ item.git_url }}/"
|
||||
|
4
releasenotes/notes/repo-owner-41db02a4d0406a7a.yaml
Normal file
4
releasenotes/notes/repo-owner-41db02a4d0406a7a.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Ensures that repositories are consistently owned by the calling user.
|
Loading…
Reference in New Issue
Block a user