1 # Copyright (c) 2018-2019 Intel Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 - name: Add go language gophers repo key
16 # due to a proxy issue in the ansible apt_key module on Ubuntu 17.10,
17 # it doesn't work to add key via `id` and `keyserver` parametes. Similar
18 # issue is described here: https://github.com/debops/ansible-elastic_co/issues/2
20 # keyserver: "{{ golang_repo_key_server }}"
21 # id: "{{ golang_repo_key_id }}"
22 # As a workaround, we can use `apt-key` tool directly with proxy specified.
24 apt-key adv --keyserver {{ golang_repo_key_server }} --recv-keys
25 --keyserver-options http-proxy={{ proxy_env.http_proxy }}
26 {{ golang_repo_key_id }}
28 - name: Add apt golang repository
30 repo: "{{ golang_repo_url }}"
31 filename: golang-1.10-go
33 - name: Install golang-1.10-go
37 - name: Setup Go environment variable
40 PATH: "{{ golang_bin_dir }}:{{ ansible_env.PATH }}"