Add variable to cgrates role to decide whether to clone the repo

Sometimes we want to use the already existing repo without overwriting. Defaults to true (will
clone).
This commit is contained in:
ionutboangiu
2023-08-04 12:39:45 -04:00
committed by Dan Christian Bogos
parent 0fab82b57e
commit db5c6cc4b9
2 changed files with 4 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
---
golang_gopath: "/home/{{ ansible_user }}/go"
clone_repository: true
cgrates_dir: "{{ golang_gopath }}/src/github.com/cgrates/cgrates"
golang_install_dir: /usr/local/go
git_version: "master"
@@ -10,4 +11,4 @@ cgrates_dependencies:
- redis-server
- mariadb-server
- make
- gcc
- gcc

View File

@@ -13,6 +13,7 @@
mode: "u=rwx,go=rx"
owner: "{{ ansible_user }}"
dest: "{{ cgrates_dir }}"
when: clone_repository
- name: Git clone cgrates
ansible.builtin.git:
@@ -21,6 +22,7 @@
update: yes
force: yes
version: "{{ git_version }}"
when: clone_repository
- name: Build cgrates
ansible.builtin.command: