Clean the cache and modcache for ansible before building CGRateS

This commit is contained in:
TeoV
2020-04-07 10:51:00 +03:00
committed by Dan Christian Bogos
parent 87f539f3c3
commit 21762def72
3 changed files with 60 additions and 0 deletions

View File

@@ -138,6 +138,26 @@
become: yes
become_user: "{{ gouser }}"
- name: clean go cache
become: yes
shell: "go clean --cache"
environment:
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
- name: clean go modcache
become: yes
shell: "go clean --modcache"
environment:
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
- name: sync the go mod with vendor
become: yes
shell: "go mod vendor"
environment:
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
args:
chdir: '{{ cgrates_dir }}'
- name: build cgrates
shell: "sh {{ cgrates_dir }}/build.sh"
environment:

View File

@@ -118,6 +118,26 @@
become: yes
become_user: "{{ gouser }}"
- name: clean go cache
become: yes
shell: "go clean --cache"
environment:
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
- name: clean go modcache
become: yes
shell: "go clean --modcache"
environment:
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
- name: sync the go mod with vendor
become: yes
shell: "go mod vendor"
environment:
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
args:
chdir: '{{ cgrates_dir }}'
- name: build cgrates for docker
shell: "sh {{ cgrates_dir }}/data/docker/scratch/build.sh"
environment:

View File

@@ -171,6 +171,26 @@
become: yes
become_user: "{{ gouser }}"
- name: clean go cache
become: yes
shell: "go clean --cache"
environment:
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
- name: clean go modcache
become: yes
shell: "go clean --modcache"
environment:
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
- name: sync the go mod with vendor
become: yes
shell: "go mod vendor"
environment:
PATH: "{{ lookup('env','PATH') }}:{{ golang_gopath }}/bin:/usr/local/go/bin:{{ ansible_env.PATH }}"
args:
chdir: '{{ cgrates_dir }}'
- name: build cgrates
shell: "sh {{ cgrates_dir }}/build.sh"
environment: