Code Review
/
ci-management.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Chore: Archive smo/a1 project
[ci-management.git]
/
packer
/
provision
/
local-docker.yaml
diff --git
a/packer/provision/local-docker.yaml
b/packer/provision/local-docker.yaml
index
fb158e8
..
d82a48d
100644
(file)
--- a/
packer/provision/local-docker.yaml
+++ b/
packer/provision/local-docker.yaml
@@
-7,6
+7,10
@@
become_user: root
become_method: sudo
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
pre_tasks:
- include_role: name=lfit.system-update
@@
-27,5
+31,13
@@
- include_role:
name: gantsign.golang
vars:
- include_role:
name: gantsign.golang
vars:
- golang_version: 1.12
ansible_become: true
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