blob: 11bb240a7b268a0b74a161e72f149a0df3cd5b5b [file] [log] [blame]
Zack Williams04575aa2022-03-19 21:51:44 -07001---
2# devtools tasks/terraform.yml
3#
4# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
5# SPDX-License-Identifier: Apache-2.0
6
7# terraform
8- name: Download terraform archive
9 get_url:
10 url: "{{ devtools_terraform_url }}"
11 checksum: "{{ devtools_terraform_checksum }}"
12 dest: "/tmp/terraform.zip"
13
14- name: Unarchive terraform
15 unarchive:
16 src: "/tmp/terraform.zip"
17 dest: "/tmp"
18 remote_src: true
19
20- name: Install terraform binary
21 copy:
22 src: /tmp/terraform
23 dest: /usr/local/bin/terraform
24 mode: "0755"
25 remote_src: true
26
27# tfmask
28- name: Download/install tfmask binary
29 get_url:
30 url: "{{ devtools_tfmask_url }}"
31 checksum: "{{ devtools_tfmask_checksum }}"
32 dest: /usr/local/bin/tfmask
33 mode: "0755"
34
35# cleanup
36- name: Cleanup terraform downloads in /tmp
37 file:
38 path: "/tmp/{{ item }}"
39 state: absent
40 with_items:
41 - terraform.zip