blob: deeb6d00ae3398d5ec9d1e8461f6c9e07dd94ab1 [file] [log] [blame]
---
# devtools tasks/shellcheck.yml
#
# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: Download shellcheck archive
get_url:
url: "{{ devtools_shellcheck_url }}"
checksum: "{{ devtools_shellcheck_checksum }}"
dest: "/tmp/shellcheck.tar.xz"
- name: Unarchive shellcheck
unarchive:
src: "/tmp/shellcheck.tar.xz"
dest: "/tmp"
remote_src: true
- name: Install shellcheck binary
copy:
src: "/tmp/shellcheck-v{{ devtools_shellcheck_version }}/shellcheck"
dest: /usr/local/bin/shellcheck
mode: "0755"
remote_src: true
# cleanup
- name: Cleanup shellcheck downloads in /tmp
file:
path: "/tmp/{{ item }}"
state: absent
with_items:
- shellcheck.tar.xz
- "shellcheck-v{{ devtools_shellcheck_version }}"