Initial devtools commit
Change-Id: Ia7b7afa7c5b310edfdb612c77fae49830a7bf5e7
diff --git a/tasks/shellcheck.yml b/tasks/shellcheck.yml
new file mode 100644
index 0000000..deeb6d0
--- /dev/null
+++ b/tasks/shellcheck.yml
@@ -0,0 +1,33 @@
+---
+# 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 }}"