From aea81f93f68b936f63eab54140c16ab4ab7bdfe3 Mon Sep 17 00:00:00 2001 From: airman604 <4887927+airman604@users.noreply.github.com> Date: Mon, 14 Sep 2020 14:33:14 -0700 Subject: [PATCH 1/2] move golang to snap install --- roles/common/tasks/golang.yml | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/roles/common/tasks/golang.yml b/roles/common/tasks/golang.yml index 5891f2c..75bb036 100644 --- a/roles/common/tasks/golang.yml +++ b/roles/common/tasks/golang.yml @@ -1,26 +1,9 @@ --- - block: - - name: 'golang : download golang 1.12.4 archive' - get_url: - url: https://dl.google.com/go/go1.12.4.linux-amd64.tar.gz - dest: /tmp/golang.tar.gz - checksum: sha256:d7d1f1f88ddfe55840712dc1747f37a790cbcaa448f6c9cf51bbe10aa65442f5 - - - name: 'golang : extract archive' - unarchive: - dest: /usr/local - remote_src: yes - src: /tmp/golang.tar.gz - - - name: 'golang : add golang directory to $PATH' - lineinfile: - insertafter: EOF - line: export PATH=$PATH:/usr/local/go/bin - path: '{{ item }}' - state: present - with_items: - - /etc/profile - - /etc/zsh/zprofile + - name: 'golang : install golang snap' + snap: + name: go + classic: yes - name: 'golang : setup $GOPATH' lineinfile: @@ -42,11 +25,6 @@ - /etc/profile - /etc/zsh/zprofile - - name: 'golang : cleanup fragments' - file: - dest: /tmp/golang.tar.gz - state: absent - tags: - common - golang From 97d9244c9100910f44650e613b4f47a6307fa577 Mon Sep 17 00:00:00 2001 From: airman604 <4887927+airman604@users.noreply.github.com> Date: Mon, 14 Sep 2020 15:36:26 -0700 Subject: [PATCH 2/2] move node.js install to snap --- roles/common/tasks/node.yml | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/roles/common/tasks/node.yml b/roles/common/tasks/node.yml index a2aff3b..fba3c95 100644 --- a/roles/common/tasks/node.yml +++ b/roles/common/tasks/node.yml @@ -1,19 +1,12 @@ --- - block: - - name: 'node : download setup script' - get_url: - url: https://deb.nodesource.com/setup_10.x - dest: /tmp/node_setup.sh - - - name: 'node : execute PPA setup script' - shell: bash /tmp/node_setup.sh - - - name: 'node : install Node' - apt: - name: nodejs - state: present - update_cache: yes + - name: 'node : install LTS version with snap' + snap: + name: go + classic: yes +# add the following if version 10.x is preferred to LTS + # channel: "10" - name: 'node : import Yarn APT key' apt_key: @@ -32,11 +25,6 @@ name: yarn state: present - - name: 'node : cleanup temp files' - file: - path: /tmp/node_setup.sh - state: absent - tags: - common - node