Skip to content
This repository was archived by the owner on Oct 16, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 4 additions & 26 deletions roles/common/tasks/golang.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -42,11 +25,6 @@
- /etc/profile
- /etc/zsh/zprofile

- name: 'golang : cleanup fragments'
file:
dest: /tmp/golang.tar.gz
state: absent

tags:
- common
- golang
Expand Down
24 changes: 6 additions & 18 deletions roles/common/tasks/node.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -32,11 +25,6 @@
name: yarn
state: present

- name: 'node : cleanup temp files'
file:
path: /tmp/node_setup.sh
state: absent

tags:
- common
- node
Expand Down