| # This Ansible playbook adds packages to the |
| # O-RAN-SC build minion image that has Docker. |
| --- |
| - import_playbook: ../common-packer/provision/docker.yaml |
| |
| - hosts: all |
| become_user: root |
| become_method: sudo |
| |
| vars: |
| golang_version: 1.19 |
| gopath: "/opt/go/{{golang_version}}/bin" |
| |
| pre_tasks: |
| - include_role: name=lfit.system-update |
| |
| tasks: |
| - include_role: |
| name: geerlingguy.ruby |
| vars: |
| ruby_install_gems: |
| - rake |
| ruby_install_bundler: false |
| ruby_install_from_source: true |
| ansible_become: true |
| ruby_download_url: http://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.1.tar.gz |
| ruby_version: 2.5.1 |
| |
| - name: "Install PackageCloud" |
| command: "gem install package_cloud" |
| become: true |
| |
| - include_role: |
| name: gantsign.golang |
| vars: |
| ansible_become: true |
| |
| - name: Add Go to Ubuntu path |
| lineinfile: |
| path: /etc/environment |
| regexp: 'PATH=(["]*)((?!.*?{{gopath}}).*?)(["]*)$' |
| line: 'PATH=\1\2:{{gopath}}\3' |
| backrefs: yes |
| when: ansible_distribution == 'Ubuntu' |
| become: yes |