blob: d82a48d51c3c63a4fa9920ef13b308b31de04ef0 [file] [log] [blame]
# 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.17
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
- 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