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:
Emiliano Vavassori 2016-06-03 11:45:55 +02:00
parent 1ec657956a
commit 26b66684a0
4 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,3 @@
---
client_gitrepo: "https://github.com/bglug-it/client-pull-installation.git"
client_gitbranch: master

View File

@ -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

View 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"

View File

@ -1,3 +1,7 @@
---
- include: initvars.yml
tags: git-daemon
- include: git-daemon.yml
tags: git-daemon