Add symbolic link to Go bin 67/64867/1
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Wed, 5 Sep 2018 20:38:55 +0000 (13:38 -0700)
committerJessica Wagantall <jwagantall@linuxfoundation.org>
Wed, 5 Sep 2018 20:38:55 +0000 (13:38 -0700)
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>
packer/provision/local-docker.yaml

index ecf9e46..7bb1c03 100644 (file)
             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