Install golang 1.8.1 with ansible
Cette révision appartient à :
Parent
24fe8f2689
révision
bd8cf8cfcd
3 fichiers modifiés avec 19 ajouts et 0 suppressions
17
deploy/ansible/roles/golang/tasks/main.yml
Fichier normal
17
deploy/ansible/roles/golang/tasks/main.yml
Fichier normal
|
@ -0,0 +1,17 @@
|
|||
- name: Download Golang
|
||||
get_url:
|
||||
url: "https://storage.googleapis.com/golang/go{{ golang_version }}.linux-amd64.tar.gz"
|
||||
dest: /tmp/golang.tar.gz
|
||||
|
||||
- name: Unzip golang
|
||||
unarchive:
|
||||
src: /tmp/golang.tar.gz
|
||||
dest: /usr/local/
|
||||
remote_src: True
|
||||
become: true
|
||||
|
||||
- name: Add go to PATH
|
||||
lineinfile:
|
||||
path: ~/.bashrc
|
||||
regexp: 'export PATH='
|
||||
line: 'export PATH=$PATH:/usr/local/go/bin'
|
1
deploy/ansible/roles/golang/vars/main.yml
Fichier normal
1
deploy/ansible/roles/golang/vars/main.yml
Fichier normal
|
@ -0,0 +1 @@
|
|||
golang_version: 1.8.1
|
|
@ -2,6 +2,7 @@
|
|||
hosts: webservers
|
||||
roles:
|
||||
- docker
|
||||
- golang
|
||||
|
||||
- name: Set up databases
|
||||
hosts: dbs
|
||||
|
|
Référencer dans un nouveau ticket