Lott, Christopher (cl778h) | a7986d5 | 2019-12-20 09:26:38 -0500 | [diff] [blame] | 1 | # This Ansible playbook adds packages to the |
| 2 | # O-RAN-SC build minion image that has Docker. |
Vanessa Rene Valderrama | 09efce9 | 2019-08-16 13:19:42 -0500 | [diff] [blame] | 3 | --- |
| 4 | - import_playbook: ../common-packer/provision/docker.yaml |
| 5 | |
Vanessa Rene Valderrama | a5a5bec | 2019-08-23 10:46:43 -0500 | [diff] [blame] | 6 | - hosts: all |
| 7 | become_user: root |
| 8 | become_method: sudo |
| 9 | |
Eric Ball | c07b159 | 2020-02-13 05:24:52 -0800 | [diff] [blame] | 10 | vars: |
Anil Belur | 8313829 | 2021-09-20 12:07:42 +1000 | [diff] [blame] | 11 | golang_version: 1.17 |
Eric Ball | c07b159 | 2020-02-13 05:24:52 -0800 | [diff] [blame] | 12 | gopath: '/opt/go/{{golang_version}}/bin' |
| 13 | |
Vanessa Rene Valderrama | a5a5bec | 2019-08-23 10:46:43 -0500 | [diff] [blame] | 14 | pre_tasks: |
| 15 | - include_role: name=lfit.system-update |
| 16 | |
Vanessa Rene Valderrama | 09efce9 | 2019-08-16 13:19:42 -0500 | [diff] [blame] | 17 | tasks: |
Eric Ball | e7fc37f | 2020-01-09 17:26:23 -0800 | [diff] [blame] | 18 | - include_role: |
Eric Ball | 01792ca | 2020-01-23 08:07:52 -0800 | [diff] [blame] | 19 | 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 Ball | 6cacfd9 | 2020-01-15 18:51:10 -0800 | [diff] [blame] | 32 | name: gantsign.golang |
Eric Ball | e7fc37f | 2020-01-09 17:26:23 -0800 | [diff] [blame] | 33 | vars: |
Eric Ball | 6cacfd9 | 2020-01-15 18:51:10 -0800 | [diff] [blame] | 34 | ansible_become: true |
Eric Ball | c07b159 | 2020-02-13 05:24:52 -0800 | [diff] [blame] | 35 | |
| 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 |