blob: d82a48d51c3c63a4fa9920ef13b308b31de04ef0 [file] [log] [blame]
Lott, Christopher (cl778h)a7986d52019-12-20 09:26:38 -05001# This Ansible playbook adds packages to the
2# O-RAN-SC build minion image that has Docker.
Vanessa Rene Valderrama09efce92019-08-16 13:19:42 -05003---
4- import_playbook: ../common-packer/provision/docker.yaml
5
Vanessa Rene Valderramaa5a5bec2019-08-23 10:46:43 -05006- hosts: all
7 become_user: root
8 become_method: sudo
9
Eric Ballc07b1592020-02-13 05:24:52 -080010 vars:
Anil Belur83138292021-09-20 12:07:42 +100011 golang_version: 1.17
Eric Ballc07b1592020-02-13 05:24:52 -080012 gopath: '/opt/go/{{golang_version}}/bin'
13
Vanessa Rene Valderramaa5a5bec2019-08-23 10:46:43 -050014 pre_tasks:
15 - include_role: name=lfit.system-update
16
Vanessa Rene Valderrama09efce92019-08-16 13:19:42 -050017 tasks:
Eric Balle7fc37f2020-01-09 17:26:23 -080018 - include_role:
Eric Ball01792ca2020-01-23 08:07:52 -080019 name: geerlingguy.ruby
20 vars:
21 ruby_install_gems:
22 - rake
23 ruby_install_bundler: false
24 ruby_install_from_source: true
25 ansible_become: true
26
27 - name: 'Install PackageCloud'
28 command: 'gem install package_cloud'
29 become: true
30
31 - include_role:
Eric Ball6cacfd92020-01-15 18:51:10 -080032 name: gantsign.golang
Eric Balle7fc37f2020-01-09 17:26:23 -080033 vars:
Eric Ball6cacfd92020-01-15 18:51:10 -080034 ansible_become: true
Eric Ballc07b1592020-02-13 05:24:52 -080035
36 - name: Add Go to Ubuntu path
37 lineinfile:
38 path: /etc/environment
39 regexp: 'PATH=(["]*)((?!.*?{{gopath}}).*?)(["]*)$'
40 line: 'PATH=\1\2:{{gopath}}\3'
41 backrefs: yes
42 when: ansible_distribution == 'Ubuntu'
43 become: yes