Add symbolic link to Go bin
Add symbolic link in /usr/bin instead of
updating PATH since this one gets lost once
packer finishes building and does not gets
preserved after.
Change-Id: Ic523a19351de0eb7f440153a51acd98920135202
Issue-ID: CIMAN-33
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
diff --git a/packer/provision/local-docker.yaml b/packer/provision/local-docker.yaml
index ecf9e46..7bb1c03 100644
--- a/packer/provision/local-docker.yaml
+++ b/packer/provision/local-docker.yaml
@@ -35,8 +35,11 @@
dest: /usr/local
remote_src: true
become: true
- - name: 'Add golang to PATH'
- command: 'echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile'
+ - name: Create symbolic link to go bin
+ file:
+ src: "/usr/local/go/bin/go"
+ dest: "/usr/bin/go"
+ state: link
become: true
- name: Install libxml2-utils