Compare commits

...

5 Commits

Author SHA1 Message Date
5cbbf5e777 Add go directory to PATH 2021-10-03 21:51:22 +02:00
4b442be5ac Remove unused path from PATH 2021-10-03 21:40:25 +02:00
87d8a43119 Install go manually 2021-10-03 21:40:25 +02:00
3f9dd1a39a Get rid of snap 2021-10-03 21:38:29 +02:00
91a3099822 Drop "--sync" from nvim plugin commands 2021-10-03 18:48:03 +02:00
4 changed files with 73 additions and 6 deletions

View File

@@ -11,9 +11,6 @@ packages:
- cmake - cmake
- maven - maven
- base-devel - base-devel
golang:
ubuntu: ["golang-go"]
archlinux: ["go"]
make: make:
ubuntu: ["make"] ubuntu: ["make"]
archlinux: ["make"] archlinux: ["make"]
@@ -397,3 +394,9 @@ packages:
chrome: chrome:
ubuntu: ["google-chrome-stable"] ubuntu: ["google-chrome-stable"]
archlinux: [] archlinux: []
snap:
ubuntu: ["snapd"]
archlinux: []
golang:
ubuntu: ["golang-go"]
archlinux: ["go"]

View File

@@ -507,6 +507,70 @@
when: distro == 'ubuntu' when: distro == 'ubuntu'
tags: [signal] tags: [signal]
- block:
- name: set go version
set_fact:
go_version: "1.17.1"
- name: stat go target directory
stat:
path: /usr/local/go-v{{ go_version }}
register: go_target_stat
- block:
- name: create temporary directory for go download
tempfile:
state: directory
register: go_download
- name: download go
get_url:
url: https://golang.org/dl/go{{ go_version }}.linux-amd64.tar.gz
dest: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
- name: unpack go
unarchive:
src: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
owner: root
group: root
mode: '0755'
dest: "{{ go_download.path }}"
remote_src: true
become: true
- name: install new go version
command: mv "{{ go_download.path }}/go/" /usr/local/go-v{{ go_version }}
become: true
- name: clean up go download directory
file:
path: "{{ go_download.path }}"
state: absent
when: not go_target_stat.stat.exists
- name: link to the current go version
file:
src: /usr/local/go-v{{ go_version }}
dest: /usr/local/go
owner: root
group: root
state: link
force: true
become: true
- name: add go directory to PATH
copy:
dest: /etc/profile.d/go.sh
content: |
PATH=$PATH:/usr/local/go/bin
owner: root
group: root
mode: '0755'
become: true
tags: [go]
- name: create dotfiles group - name: create dotfiles group
group: group:
name: dotfiles name: dotfiles

View File

@@ -315,7 +315,7 @@
failed_when: ycm_before_update.rc not in (0, 200) failed_when: ycm_before_update.rc not in (0, 200)
- name: install vim plugins - name: install vim plugins
command: /usr/bin/nvim --headless +"PlugInstall --sync" +qall command: /usr/bin/nvim --headless +PlugInstall +qall
changed_when: false changed_when: false
- name: install go binaries for vim - name: install go binaries for vim
@@ -323,7 +323,7 @@
changed_when: false changed_when: false
- name: update vim plugins - name: update vim plugins
command: /usr/bin/nvim --headless +"PlugUpdate --sync" +qall command: /usr/bin/nvim --headless +PlugUpdate +qall
changed_when: false changed_when: false
- name: update go binaries for vim - name: update go binaries for vim

View File

@@ -1,12 +1,12 @@
_path=("$HOME/bin" _path=("$HOME/bin"
"$HOME/.optbin" "$HOME/.optbin"
"/usr/local/go/bin"
"/usr/local/sbin" "/usr/local/sbin"
"/usr/local/bin" "/usr/local/bin"
"/usr/sbin" "/usr/sbin"
"/usr/bin" "/usr/bin"
"/sbin" "/sbin"
"/bin" "/bin"
"/usr/bin/core_perl"
"/usr/games") "/usr/games")
PATH="" PATH=""