mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
update Go in chroots when version differs
This commit is contained in:
committed by
Dan Christian Bogos
parent
0bca9f21e9
commit
cef9bd63ee
@@ -91,6 +91,26 @@
|
||||
mode: "0644"
|
||||
when: not downloaded_go_tarball.stat.exists
|
||||
|
||||
- name: Check Go version in chroots
|
||||
become: true
|
||||
ansible.builtin.command: >-
|
||||
chroot /var/cache/pbuilder/base-{{ item.codename }}+go.cow
|
||||
bash -c "GOROOT=/usr/local/go /usr/local/go/bin/go version"
|
||||
register: chroot_go_version
|
||||
ignore_errors: true
|
||||
with_items: "{{ distributions }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Remove old Go from chroots when version differs
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "/var/cache/pbuilder/base-{{ item.item.codename }}+go.cow/usr/local/go"
|
||||
state: absent
|
||||
with_items: "{{ chroot_go_version.results }}"
|
||||
when:
|
||||
- item.rc == 0
|
||||
- go_version not in item.stdout
|
||||
|
||||
- name: Install Go in chroots
|
||||
become: true
|
||||
ansible.builtin.unarchive:
|
||||
|
||||
Reference in New Issue
Block a user