From 6998710c2e18032fd0b7158bd60a5a23bed51565 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Mon, 27 Nov 2017 23:10:14 +0100 Subject: [PATCH 1/3] Initial working version --- .gitignore | 30 ++++++++ .travis.yml | 72 +++++++++++++++++++ Dockerfile | 20 ++++++ LICENSE.txt | 19 +++++ README.md | 49 +++++++------ Vagrantfile | 56 +++++++++++++++ defaults/main.yml | 12 ++-- files/empty | 0 files/go-bin.sh | 1 - files/go-path.sh | 2 - meta/main.yml | 42 ++++------- tasks/main.yml | 115 ++++++++++++++++++++++--------- templates/etc/profile.d/go.sh.j2 | 4 ++ tests/inventory | 1 + tests/test.yml | 7 ++ tests/vagrant.yml | 9 +++ vars/main.yml | 12 +++- 17 files changed, 359 insertions(+), 92 deletions(-) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 Dockerfile create mode 100644 LICENSE.txt create mode 100644 Vagrantfile create mode 100644 files/empty delete mode 100644 files/go-bin.sh delete mode 100644 files/go-path.sh create mode 100644 templates/etc/profile.d/go.sh.j2 create mode 100644 tests/inventory create mode 100644 tests/test.yml create mode 100644 tests/vagrant.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f74c83a --- /dev/null +++ b/.gitignore @@ -0,0 +1,30 @@ +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +Icon? +ehthumbs.db +Thumbs.db + +# IDE files # +################# +/.settings +/.buildpath +/.project +/nbproject +*.komodoproject +*.kpf +/.idea + +# Vagrant files # +.virtualbox/ +.vagrant/ +vagrant_ansible_inventory_* +ansible.cfg + +# Other files # +############### +!empty diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..832c7c5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,72 @@ +--- +sudo: required +dist: trusty + +language: python +python: "2.7" + +env: + - ANSIBLE_VERSION=latest + - ANSIBLE_VERSION=2.4.1.0 + - ANSIBLE_VERSION=2.4.0.0 + - ANSIBLE_VERSION=2.3.2.0 + - ANSIBLE_VERSION=2.3.1.0 + - ANSIBLE_VERSION=2.3.0.0 + - ANSIBLE_VERSION=2.2.3.0 + - ANSIBLE_VERSION=2.2.2.0 + - ANSIBLE_VERSION=2.2.1.0 + - ANSIBLE_VERSION=2.2.0.0 + - ANSIBLE_VERSION=2.1.6 + - ANSIBLE_VERSION=2.1.5 + - ANSIBLE_VERSION=2.1.4 + - ANSIBLE_VERSION=2.1.3 + - ANSIBLE_VERSION=2.1.2 + - ANSIBLE_VERSION=2.1.1.0 + - ANSIBLE_VERSION=2.1.0.0 + - ANSIBLE_VERSION=2.0.2.0 + - ANSIBLE_VERSION=2.0.1.0 + - ANSIBLE_VERSION=2.0.0.2 + - ANSIBLE_VERSION=2.0.0.1 + - ANSIBLE_VERSION=2.0.0.0 + +branches: + only: + - master + +before_install: + - sudo apt-get update -qq + +install: + # Install Ansible. + - if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible; else pip install ansible==$ANSIBLE_VERSION; fi + - if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible-lint; fi + +script: + # Check the role/playbook's syntax. + - ansible-playbook -i tests/inventory tests/test.yml --syntax-check + + # Run the role/playbook with ansible-playbook. + - ansible-playbook -i tests/inventory tests/test.yml -vvvv + + # Run the role/playbook again, checking to make sure it's idempotent. + - > + ansible-playbook -i tests/inventory tests/test.yml + | grep -q 'changed=0.*failed=0' + && (echo 'Idempotence test: pass' && exit 0) + || (echo 'Idempotence test: fail' && exit 1) + + # Test gosu installation + - > + which gosu + | grep -q 'gosu' + && (echo 'Availability test: pass' && exit 0) + || (echo 'Availability test: fail' && exit 1) + + - if [ "$ANSIBLE_VERSION" = "latest" ]; then ansible-lint tests/test.yml || true; fi + +notifications: + email: false + hipchat: + rooms: + secure: FYzsinCX15LIBtnvnd/gXQJjrjsRuaESeQmnXZXhJ2rfNByr817uM5zS5NwG5KB0opmO7c70EJAsCH/ZZyWlvuZJLylPmMeyW9lXJxV5ZBG6TcDRzoPuYFVGU0efYyWpeI3lrMZEX9jjxeGsFk4wEPSecfB46godc4o7fAGQYxLqggNbA5s8PALMsyaLrtyyc/D9gUj16UDYVldiTIWIvHvMbDiO+N9ZPU5U4h+GT7WmogX+599Vc/qxamxMda8gGroQl8fvWQyOCh4UOzJEQK3W8pumsF9IepWhJ7Q3/8xXbzX14sngU9/6lAmGyT4hVUhpMEK49FrzC7a5JUznWG96YOK3MFAgrN6RSqdKuZ4XHY+bHNTOVUVoj4jFYdnoHmhU69PPtNs9hW2Bt5Ju/beOpajxa+uPEThRFt3EkO/kRMvr01JgIKDxEoDG3WrkL1zGMNuZoLOx+UvO1M15LeOv6Vx2sRpYVY1TL5g2v0hyZ4qT5/Z5QcTbBJgNkgml9RKtIoqHj/+BtYp3uqOtNqZ5lyvBgk3nshq5ohSIBmHMJh6oKBhjsafWm+OT6iz/AZyWOlsr0R5eCEUS2s5GvowegLATfMAQGh2pxI+Wq733YyiP0oHDOVFh4I4ktjq82ef09SjtITEb8RALoDGCP1fUI5g6MYUDgR3oC3UJp+M= + webhooks: https://galaxy.ansible.com/api/v1/notifications/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d9adf96 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:16.04 +MAINTAINER Mischa ter Smitten + +# python +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y python-minimal python-dev curl && \ + apt-get clean +RUN curl -sL https://bootstrap.pypa.io/get-pip.py | python - +RUN rm -rf $HOME/.cache + +# ansible +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y gcc libffi-dev libssl-dev && \ + apt-get clean +RUN pip install ansible==2.3.2.0 +RUN rm -rf $HOME/.cache + +# provision +COPY . /etc/ansible/roles/ansible-role +WORKDIR /etc/ansible/roles/ansible-role +RUN ansible-playbook -i tests/inventory tests/test.yml --connection=local diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..5708f35 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (c) Oefenweb.nl + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md index dbf59f9..978c15c 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,44 @@ -Go -======== +## go -Ansible role that installs [Go](https://golang.org/). The latest stable release that has been compiled for x86 64-bit Linux systems is installed by default, and different platforms and versions are supported by modifying the role variables. +[![Build Status](https://travis-ci.org/Oefenweb/ansible-go.svg?branch=master)](https://travis-ci.org/Oefenweb/ansible-go) [![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-go-blue.svg)](https://galaxy.ansible.com/Oefenweb/go/) -Role Variables --------------- +Set up (the latest or a specific version of) [Go](https://golang.org/) in Debian-like systems. -All of these variables are optional and should only be changed if you need to install a different version of Go (e.g. if you are installing on FreeBSD, or if you need to use an earlier release). +#### Requirements -`go_tarball`: The tarball that you want to install. A list of options can be found on the [Go Downloads page](https://golang.org/dl/). The default is the official x86 64-bit Linux tarball for the latest stable release. +None -`go_tarball_checksum`: This variable specifies the algorithm and checksum for the tarball that you want to install (e.g. `sha1:c7d78ba4df574b5f9a9bb5d17505f40c4d89b81c` or `sha256:a96cce8ce43a9bf9b2a4c7d470bc7ee0cb00410da815980681c8353218dcf146`). The default is the SHA256 checksum of the official x86 64-bit tarball for the latest stable release. Checksums can be found on the [Go Download Page](https://golang.org/dl/). +#### Variables -`go_version_target`: The string that the `go version` command is expected to return (e.g. "go version go1.2.1 linux/amd64"). This variable is used to control whether or not the Go tarball should be extracted, thereby upgrading (or downgrading) a previously installed copy. If the installed version already matches the target, the extraction step is skipped. +* `go_version`: [default: `go version go1.8.1 linux/amd64`]: Version string (to check) +* `go_tarball`: [default: `go1.8.1.linux-amd64.tar.gz`]: Tarball to install +* `go_tarball_checksum`: [default: `sha256:a579ab19d5237e263254f1eac5352efcf1d70b9dacadb6d6bb12b0911ede8994`]: Tarball checksum (to check) -`go_download_location`: The full download URL. This variable simply appends the `go_tarball` variable onto the Go Download URL. This should not need to be modified. +* `go_install_prefix`: [default: `/usr/local`]: Install prefix -`set_go_path`: Whether or not to set the GOPATH for all users. The default is `true`. +* `go_remove_distro_version`: [default: `true`]: Whether or not to remove distribution versions -License -------- +## Dependencies -The MIT License (MIT) +None -Copyright (c) 2013-2016 Joshua Lund +#### Example -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +```yaml +--- +- hosts: all + roles: + - go +``` -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +#### License -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +MIT -Author Information ------------------- +#### Author Information -You can find me on [Twitter](https://twitter.com/joshualund), and on [GitHub](https://github.com/jlund/). I also occasionally blog at [MissingM](https://missingm.co). +Mischa ter Smitten (based on work of [Joshua Lund](https://github.com/jlund) and [Mahesh Paolini-Subramanya](https://github.com/dieswaytoofast)) + +#### Feedback, bug-reports, requests, ... + +Are [welcome](https://github.com/Oefenweb/ansible-go/issues)! diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..0e75908 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,56 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby ts=2 sw=2 tw=0 et : + +role = File.basename(File.expand_path(File.dirname(__FILE__))) + +boxes = [ + { + :name => "ubuntu-1404", + :box => "bento/ubuntu-14.04", + :ip => '10.0.0.12', + :cpu => "50", + :ram => "256" + }, + { + :name => "ubuntu-1604", + :box => "bento/ubuntu-16.04", + :ip => '10.0.0.13', + :cpu => "50", + :ram => "256" + }, + { + :name => "debian-8", + :box => "bento/debian-8", + :ip => '10.0.0.15', + :cpu => "50", + :ram => "256" + }, + { + :name => "debian-9", + :box => "bento/debian-9", + :ip => '10.0.0.16', + :cpu => "50", + :ram => "256" + }, +] + +Vagrant.configure("2") do |config| + boxes.each do |box| + config.vm.define box[:name] do |vms| + vms.vm.box = box[:box] + vms.vm.hostname = "ansible-#{role}-#{box[:name]}" + + vms.vm.provider "virtualbox" do |v| + v.customize ["modifyvm", :id, "--cpuexecutioncap", box[:cpu]] + v.customize ["modifyvm", :id, "--memory", box[:ram]] + end + + vms.vm.network :private_network, ip: box[:ip] + + vms.vm.provision :ansible do |ansible| + ansible.playbook = "tests/vagrant.yml" + ansible.verbose = "vv" + end + end + end +end diff --git a/defaults/main.yml b/defaults/main.yml index e559479..d6acd96 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,9 @@ +# defaults file for go --- -go_tarball: "go1.8.1.linux-amd64.tar.gz" -go_tarball_checksum: "sha256:a579ab19d5237e263254f1eac5352efcf1d70b9dacadb6d6bb12b0911ede8994" -go_version_target: "go version go1.8.1 linux/amd64" -set_go_path: true +go_version: 'go version go1.8.1 linux/amd64' +go_tarball: 'go1.8.1.linux-amd64.tar.gz' +go_tarball_checksum: 'sha256:a579ab19d5237e263254f1eac5352efcf1d70b9dacadb6d6bb12b0911ede8994' + +go_install_prefix: /usr/local + +go_remove_distro_version: true diff --git a/files/empty b/files/empty new file mode 100644 index 0000000..e69de29 diff --git a/files/go-bin.sh b/files/go-bin.sh deleted file mode 100644 index 680c12a..0000000 --- a/files/go-bin.sh +++ /dev/null @@ -1 +0,0 @@ -export PATH=$PATH:/usr/local/go/bin diff --git a/files/go-path.sh b/files/go-path.sh deleted file mode 100644 index 5f4ffac..0000000 --- a/files/go-path.sh +++ /dev/null @@ -1,2 +0,0 @@ -export GOPATH=$HOME/go -export PATH=$GOPATH/bin:$PATH diff --git a/meta/main.yml b/meta/main.yml index 55c97f9..29f7a45 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,40 +1,22 @@ +# meta file for go --- galaxy_info: - author: "Joshua Lund" - description: "Ansible role that installs Go (https://golang.org/). The latest stable release that has been compiled for x86 64-bit Linux systems is installed by default, and different platforms and versions are supported by modifying the role variables." + author: Mischa ter Smitten + company: Oefenweb.nl B.V. + description: Set up (the latest or a specific version of) Go in Debian-like systems license: MIT - min_ansible_version: 2.0 + min_ansible_version: 2.0.0.0 platforms: - - name: EL - versions: - - all - - name: GenericUNIX - versions: - - all - - name: Fedora - versions: - - all - - name: opensuse - versions: - - all - - name: GenericBSD - versions: - - all - - name: FreeBSD - versions: - - all - name: Ubuntu versions: - - all - - name: SLES - versions: - - all - - name: GenericLinux - versions: - - all + - trusty + - xenial - name: Debian versions: - - all - categories: + - jessie + - stretch + galaxy_tags: - development + - packaging + - system dependencies: [] diff --git a/tasks/main.yml b/tasks/main.yml index 72f63d3..b78a2f5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,36 +1,85 @@ +# tasks file for go --- -- name: Download the Go tarball - get_url: - url: "{{ go_download_location }}" - dest: /usr/local/src/{{ go_tarball }} - checksum: "{{ go_tarball_checksum }}" - -- name: Register the current Go version (if any) - command: /usr/local/go/bin/go version - ignore_errors: yes - register: go_version +- name: get (current) version + command: "{{ go_version_command }}" + register: _get_current_version changed_when: false + failed_when: false + tags: + - configuration + - go + - go-get-version -- name: Remove old installation of Go - file: - path: /usr/local/go - state: absent - when: go_version|failed or go_version.stdout != go_version_target - -- name: Extract the Go tarball if Go is not yet installed or not the desired version - unarchive: - src: /usr/local/src/{{ go_tarball }} - dest: /usr/local - copy: no - when: go_version|failed or go_version.stdout != go_version_target - -- name: Add the Go bin directory to the PATH environment variable for all users - copy: - src: go-bin.sh - dest: /etc/profile.d - -- name: Set GOPATH for all users - copy: - src: go-path.sh - dest: /etc/profile.d - when: set_go_path +- block: + + - name: create (download) directory + file: + path: "{{ go_download_path }}" + state: directory + owner: root + group: root + mode: 0755 + tags: + - go-download-directory + + - name: download + get_url: + url: "{{ go_download_url }}" + dest: "{{ go_download_path }}/{{ go_tarball }}" + checksum: "{{ go_tarball_checksum }}" + owner: root + group: root + mode: 0644 + tags: + - go-download-file + + - name: remove distro versions + apt: + name: "{{ item }}" + state: absent + purge: true + when: go_remove_distro_version | bool + with_items: "{{ go_distro_versions }}" + tags: + - go-remove + - go-remove-distro + + - name: remove current version + file: + path: "{{ go_install_prefix }}/go" + state: absent + tags: + - go-remove + - go-remove-current + + - name: extract + unarchive: + src: "{{ go_download_path }}/{{ go_tarball }}" + dest: "{{ go_install_prefix }}" + creates: "{{ go_install_prefix }}/go" + copy: false + tags: + - go-extract + + - name: configure environment (variables) + template: + src: etc/profile.d/go.sh.j2 + dest: /etc/profile.d/go.sh.j2 + owner: root + group: root + mode: 0644 + tags: + - go-configure-environment + + - name: check (installed) version + command: "{{ go_version_command }}" + register: _get_installed_version + failed_when: "_get_installed_version.stdout | default('') != go_version" + changed_when: false + tags: + - go-check-version + + when: _get_current_version.stdout | default('') != go_version + tags: + - configuration + - go diff --git a/templates/etc/profile.d/go.sh.j2 b/templates/etc/profile.d/go.sh.j2 new file mode 100644 index 0000000..8ac2a45 --- /dev/null +++ b/templates/etc/profile.d/go.sh.j2 @@ -0,0 +1,4 @@ +# {{ ansible_managed }} + +export GOPATH="{{ go_install_prefix }}/go"; +export PATH="${PATH}:${GOPATH}/bin"; diff --git a/tests/inventory b/tests/inventory new file mode 100644 index 0000000..2fbb50c --- /dev/null +++ b/tests/inventory @@ -0,0 +1 @@ +localhost diff --git a/tests/test.yml b/tests/test.yml new file mode 100644 index 0000000..c3dab21 --- /dev/null +++ b/tests/test.yml @@ -0,0 +1,7 @@ +# test file for go +--- +- hosts: localhost + connection: local + become: true + roles: + - ../../ diff --git a/tests/vagrant.yml b/tests/vagrant.yml new file mode 100644 index 0000000..7314a0d --- /dev/null +++ b/tests/vagrant.yml @@ -0,0 +1,9 @@ +# test file for go +--- +- hosts: all + remote_user: vagrant + become: true + roles: + - ../../ + vars: + go_install_prefix: /opt diff --git a/vars/main.yml b/vars/main.yml index 7618a61..670a413 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,2 +1,12 @@ +# vars file for go --- -go_download_location: "https://storage.googleapis.com/golang/{{ go_tarball }}" +go_version_command: "{{ go_install_prefix }}/go/bin/go version" +go_distro_versions: + - golang + - golang-1.6 + - golang-1.7 + - golang-1.8 + - golang-1.9 + +go_download_path: /var/lib/ansible/go/downloads +go_download_url: "https://storage.googleapis.com/golang/{{ go_tarball }}" From 727a6391f47225ece96c00790e1bebe2620857d2 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Wed, 29 Nov 2017 11:40:02 +0100 Subject: [PATCH 2/3] Make go 1.9.2 the default version --- .travis.yml | 7 ------- README.md | 6 +++--- defaults/main.yml | 14 +++++++++++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 832c7c5..8a80b45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,13 +55,6 @@ script: && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) - # Test gosu installation - - > - which gosu - | grep -q 'gosu' - && (echo 'Availability test: pass' && exit 0) - || (echo 'Availability test: fail' && exit 1) - - if [ "$ANSIBLE_VERSION" = "latest" ]; then ansible-lint tests/test.yml || true; fi notifications: diff --git a/README.md b/README.md index 978c15c..ee21303 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ None #### Variables -* `go_version`: [default: `go version go1.8.1 linux/amd64`]: Version string (to check) -* `go_tarball`: [default: `go1.8.1.linux-amd64.tar.gz`]: Tarball to install -* `go_tarball_checksum`: [default: `sha256:a579ab19d5237e263254f1eac5352efcf1d70b9dacadb6d6bb12b0911ede8994`]: Tarball checksum (to check) +* `go_version`: [default: `go version go1.9.2 linux/amd64`]: Version string (to check) +* `go_tarball`: [default: `go1.9.2.linux-amd64.tar.gz`]: Tarball to install +* `go_tarball_checksum`: [default: `sha256:de874549d9a8d8d8062be05808509c09a88a248e77ec14eb77453530829ac02b`]: Tarball checksum (to check) * `go_install_prefix`: [default: `/usr/local`]: Install prefix diff --git a/defaults/main.yml b/defaults/main.yml index d6acd96..2d9ece4 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,8 +1,16 @@ # defaults file for go --- -go_version: 'go version go1.8.1 linux/amd64' -go_tarball: 'go1.8.1.linux-amd64.tar.gz' -go_tarball_checksum: 'sha256:a579ab19d5237e263254f1eac5352efcf1d70b9dacadb6d6bb12b0911ede8994' +go_version: 'go version go1.9.2 linux/amd64' +go_tarball: 'go1.9.2.linux-amd64.tar.gz' +go_tarball_checksum: 'sha256:de874549d9a8d8d8062be05808509c09a88a248e77ec14eb77453530829ac02b' + +# go_version: 'go version go1.8.5 linux/amd64' +# go_tarball: 'go1.8.5.linux-amd64.tar.gz' +# go_tarball_checksum: 'sha256:4f8aeea2033a2d731f2f75c4d0a4995b357b22af56ed69b3015f4291fca4d42d' + +# go_version: 'go version go1.7.6 linux/amd64' +# go_tarball: 'go1.7.6.linux-amd64.tar.gz' +# go_tarball_checksum: 'sha256:ad5808bf42b014c22dd7646458f631385003049ded0bb6af2efc7f1f79fa29ea' go_install_prefix: /usr/local From b1607bbb0ea268c223cdd5e88d675770b8413a4f Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Wed, 29 Nov 2017 13:28:48 +0100 Subject: [PATCH 3/3] Fix profile.d path --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index b78a2f5..324111a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -64,7 +64,7 @@ - name: configure environment (variables) template: src: etc/profile.d/go.sh.j2 - dest: /etc/profile.d/go.sh.j2 + dest: /etc/profile.d/go.sh owner: root group: root mode: 0644