Adjusting git-daemon roles to honor client_gitrepo variable from domain.yml. This permits to specify a different repo than the one for BgLUG.
This commit is contained in:
parent
1ec657956a
commit
26b66684a0
3
roles/git-daemon/defaults/main.yml
Normal file
3
roles/git-daemon/defaults/main.yml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
client_gitrepo: "https://github.com/bglug-it/client-pull-installation.git"
|
||||
client_gitbranch: master
|
@ -48,7 +48,7 @@
|
||||
# E' in forma di shell perché non c'è modo di passare ad ansible
|
||||
# il parametro --mirror
|
||||
- name: Clono il repository client-pull-installation
|
||||
shell: git clone --mirror https://github.com/bglug-it/client-pull-installation.git /var/lib/git-daemon/repositories/client-pull-installation.git
|
||||
shell: git clone --mirror {{ client_gitrepo }} /var/lib/git-daemon/repositories/client-pull-installation.git
|
||||
become: yes
|
||||
become_user: git-daemon
|
||||
when: chk_clientpullinstall_repo|changed
|
||||
|
9
roles/git-daemon/tasks/initvars.yml
Normal file
9
roles/git-daemon/tasks/initvars.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
|
||||
- name: Overriding default gitrepo if defined in domain.yml
|
||||
set_fact: client_gitrepo="{{ ansible_local.domain.client_gitrepo }}"
|
||||
when: "ansible_local.domain.client_gitrepo is defined"
|
||||
|
||||
- name: Overriding default gitbranch if defined in domain.yml
|
||||
set_fact: client_gitbranch="{{ ansible_local.domain.client_gitbranch }}"
|
||||
when: "ansible_local.domain.client_gitbranch is defined"
|
@ -1,3 +1,7 @@
|
||||
---
|
||||
|
||||
- include: initvars.yml
|
||||
tags: git-daemon
|
||||
|
||||
- include: git-daemon.yml
|
||||
tags: git-daemon
|
||||
|
Loading…
x
Reference in New Issue
Block a user