blob: cc93c3d5d4736ad851d36d7ecc1f7409bb431721 [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
Kevin Sandifbd4aa52021-10-05 16:05:31 -060026 ruby_download_url: http://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.1.tar.gz
27 ruby_version: 2.5.1
Eric Ball01792ca2020-01-23 08:07:52 -080028
29 - name: 'Install PackageCloud'
30 command: 'gem install package_cloud'
31 become: true
32
33 - include_role:
Eric Ball6cacfd92020-01-15 18:51:10 -080034 name: gantsign.golang
Eric Balle7fc37f2020-01-09 17:26:23 -080035 vars:
Eric Ball6cacfd92020-01-15 18:51:10 -080036 ansible_become: true
Eric Ballc07b1592020-02-13 05:24:52 -080037
38 - name: Add Go to Ubuntu path
39 lineinfile:
40 path: /etc/environment
41 regexp: 'PATH=(["]*)((?!.*?{{gopath}}).*?)(["]*)$'
42 line: 'PATH=\1\2:{{gopath}}\3'
43 backrefs: yes
44 when: ansible_distribution == 'Ubuntu'
45 become: yes