From d3288d7a60c4269cbbc464c76335c627afdbb312 Mon Sep 17 00:00:00 2001 From: paspo Date: Sun, 22 May 2016 13:09:00 +0200 Subject: [PATCH] FEATURE: now it's possible to select the client's repo & branch --- domain.yml | 1 + roles/git-daemon/defaults/main.yml | 2 ++ roles/git-daemon/tasks/git-daemon.yml | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 roles/git-daemon/defaults/main.yml diff --git a/domain.yml b/domain.yml index 88c8939..b208560 100644 --- a/domain.yml +++ b/domain.yml @@ -23,4 +23,5 @@ org_street: "Via Zenale e Butinone, 20" mirror_mode: nfs mirror_nfs_share: 192.168.255.1:/var/spool/apt-mirror/mirror #remote_mirror: ubuntu.fastbull.org +client_gitrepo: "https://github.com/bglug-it/client-pull-installation.git" client_gitbranch: master diff --git a/roles/git-daemon/defaults/main.yml b/roles/git-daemon/defaults/main.yml new file mode 100644 index 0000000..9a83339 --- /dev/null +++ b/roles/git-daemon/defaults/main.yml @@ -0,0 +1,2 @@ +--- +client_gitrepo: "https://github.com/bglug-it/client-pull-installation.git" diff --git a/roles/git-daemon/tasks/git-daemon.yml b/roles/git-daemon/tasks/git-daemon.yml index bcd2d1b..c4a2279 100644 --- a/roles/git-daemon/tasks/git-daemon.yml +++ b/roles/git-daemon/tasks/git-daemon.yml @@ -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 {{ ansible_local.domain.client_gitrepo }} /var/lib/git-daemon/repositories/client-pull-installation.git become: yes become_user: git-daemon when: chk_clientpullinstall_repo|changed