Skip to content

Commit

Permalink
feat(#528): allow roundup group users to interact with git repos (#530
Browse files Browse the repository at this point in the history
)
  • Loading branch information
JacobCoffee authored Dec 5, 2024
1 parent 61a956f commit 2d16f11
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions salt/bugs/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ include:
- bugs.postgresql
- nginx

ensure-gitconfig-permissions:
file.managed:
- name: /etc/gitconfig
- user: root
- group: root
- mode: "0644"

roundup-deps:
pkg.installed:
- pkgs:
Expand Down Expand Up @@ -235,6 +242,14 @@ tracker-{{ tracker }}-clone-permissions:
- name: /srv/roundup/trackers/{{ tracker }}
- mode: "0750"

tracker-{{ tracker }}-add-safe-directory:
cmd.run:
- name: git config --system --add safe.directory "/srv/roundup/trackers/{{ tracker }}"
- unless: git config --system --get-all safe.directory | grep -q "^/srv/roundup/trackers/{{ tracker }}$"
- require:
- file: tracker-{{ tracker }}-clone-permissions
- file: ensure-gitconfig-permissions
tracker-{{ tracker }}-config:
file.managed:
- name: /srv/roundup/trackers/{{ tracker }}/config.ini
Expand Down

0 comments on commit 2d16f11

Please sign in to comment.