zuul-jobs/roles/ensure-go/tasks/install-go.yaml
Sorin Sbarnea 33461bbecc Enable yamllint
Adds yamllint to the linters with a minimal configuration, some
rules are disabled to allow us to fix them in follow-ups, if
we agree on them.

Fixes invalid YAML file containing characters inside block.

Fixes few minor linting issues.

Change-Id: I936fe2c997597972d884c5fc62655d28e8aaf8c5
2020-05-04 17:47:11 +01:00

25 lines
757 B
YAML

- name: Create temp directory
tempfile:
state: directory
register: go_archive_tempdir
- name: Get archive checksum
uri:
url: "https://dl.google.com/go/go{{ go_version }}.{{ go_os }}-{{ go_arch }}.tar.gz.sha256"
return_content: true
register: go_archive_checksum
- name: Download go archive
get_url:
url: "https://dl.google.com/go/go{{ go_version }}.{{ go_os }}-{{ go_arch }}.tar.gz"
dest: "{{ go_archive_tempdir.path }}/go{{ go_version }}.{{ go_os }}-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ go_archive_checksum.content }}"
- name: Install go
unarchive:
src: "{{ go_archive_tempdir.path }}/go{{ go_version }}.{{ go_os }}-{{ go_arch }}.tar.gz"
dest: "{{ go_install_dir }}"
remote_src: yes
become: true