mirror of
https://github.com/mdlayher/homelab.git
synced 2024-12-15 17:50:54 +00:00
golang: don't assume root user
This commit is contained in:
parent
9df5eac313
commit
e5f0b46b2a
2 changed files with 8 additions and 9 deletions
|
@ -64,7 +64,7 @@
|
||||||
- golang
|
- golang
|
||||||
when: install
|
when: install
|
||||||
blockinfile:
|
blockinfile:
|
||||||
dest: /{{ golang_user }}/.bashrc
|
dest: "{{ ansible_env.HOME }}/.bashrc"
|
||||||
marker: "# {mark} ansible-managed Go configuration"
|
marker: "# {mark} ansible-managed Go configuration"
|
||||||
block: |
|
block: |
|
||||||
export GOROOT={{ golang_root }}
|
export GOROOT={{ golang_root }}
|
||||||
|
@ -76,13 +76,13 @@
|
||||||
tags:
|
tags:
|
||||||
- golang
|
- golang
|
||||||
when: install
|
when: install
|
||||||
file: path={{ golang_home_dir }}/src/{{ golang_personal_gopath }} state=directory
|
file: path={{ ansible_env.HOME }}/src/{{ golang_personal_gopath }} state=directory
|
||||||
|
|
||||||
- name: symlink personal GOPATH location to ~/go
|
- name: symlink personal GOPATH location to ~/go
|
||||||
tags:
|
tags:
|
||||||
- golang
|
- golang
|
||||||
when: install
|
when: install
|
||||||
file: dest={{ golang_home_dir }}/go src={{ golang_home_dir }}/src/{{ golang_personal_gopath }} owner={{ golang_user }} group={{ golang_user }} state=link
|
file: dest={{ ansible_env.HOME }}/go src={{ ansible_env.HOME }}/src/{{ golang_personal_gopath }} owner={{ ansible_env.USER }} group={{ ansible_env.USER }} state=link
|
||||||
|
|
||||||
- name: remove temporary go tarball
|
- name: remove temporary go tarball
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
---
|
---
|
||||||
# Personal Go configuration
|
# Go version to install and its tarball checksum.
|
||||||
golang_user: "root"
|
|
||||||
golang_home_dir: "/root"
|
|
||||||
golang_personal_gopath: "github.com/mdlayher"
|
|
||||||
# Go installation configuration
|
|
||||||
golang_version: "go1.6.1"
|
golang_version: "go1.6.1"
|
||||||
|
golang_sha256: "6d894da8b4ad3f7f6c295db0d73ccc3646bce630e1c43e662a0120681d47e988"
|
||||||
|
# Personal Go configuration.
|
||||||
|
golang_personal_gopath: "github.com/mdlayher"
|
||||||
|
# Static configuration.
|
||||||
golang_url: "https://storage.googleapis.com/golang/{{ golang_version }}.linux-amd64.tar.gz"
|
golang_url: "https://storage.googleapis.com/golang/{{ golang_version }}.linux-amd64.tar.gz"
|
||||||
golang_tgz: "/tmp/golang.tar.gz"
|
golang_tgz: "/tmp/golang.tar.gz"
|
||||||
golang_sha256: "6d894da8b4ad3f7f6c295db0d73ccc3646bce630e1c43e662a0120681d47e988"
|
|
||||||
golang_root: "/usr/local/go"
|
golang_root: "/usr/local/go"
|
||||||
|
|
Loading…
Reference in a new issue