blob: 36d1129091b6996ab56b295a0d54e8e2ccd12e30 [file] [log] [blame]
Zack Williams04575aa2022-03-19 21:51:44 -07001---
2# devtools tasks/k8s.yml
3#
4# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
5# SPDX-License-Identifier: Apache-2.0
6
Zack Williamsa3ecef42022-03-19 21:51:44 -07007- name: create k8s sub dir in dist dir
8 file:
9 dest: "{{ devtools_dist_dir }}/k8s"
10 state: directory
11 owner: root
12 group: root
13 mode: 0755
Zack Williams04575aa2022-03-19 21:51:44 -070014
15# kubectl
16- name: Download/install kubectl binary
17 get_url:
18 url: "{{ devtools_kubectl_url }}"
19 checksum: "{{ devtools_kubectl_checksum }}"
20 dest: /usr/local/bin/kubectl
21 mode: "0755"
22
23# kind
24- name: Download/install kind binary
25 get_url:
26 url: "{{ devtools_kind_url }}"
27 checksum: "{{ devtools_kind_checksum }}"
28 dest: /usr/local/bin/kind
29 mode: "0755"
30
31# helm
32- name: Download helm archive
33 get_url:
34 url: "{{ devtools_helm_url }}"
35 checksum: "{{ devtools_helm_checksum }}"
Zack Williamsa3ecef42022-03-19 21:51:44 -070036 dest: "{{ devtools_dist_dir }}/helm.tgz"
Zack Williams04575aa2022-03-19 21:51:44 -070037
38- name: Unarchive helm
39 unarchive:
Zack Williamsa3ecef42022-03-19 21:51:44 -070040 src: "{{ devtools_dist_dir }}/helm.tgz"
41 dest: "{{ devtools_dist_dir }}/k8s"
Zack Williams04575aa2022-03-19 21:51:44 -070042 remote_src: true
43
44- name: Install helm binary
45 copy:
Zack Williamsa3ecef42022-03-19 21:51:44 -070046 src: "{{ devtools_dist_dir }}/k8s/linux-amd64/helm"
Zack Williams04575aa2022-03-19 21:51:44 -070047 dest: /usr/local/bin/helm
48 mode: "0755"
49 remote_src: true
50
51# kubeval
52- name: Download kubeval archive
53 get_url:
54 url: "{{ devtools_kubeval_url }}"
55 checksum: "{{ devtools_kubeval_checksum }}"
Zack Williamsa3ecef42022-03-19 21:51:44 -070056 dest: "{{ devtools_dist_dir }}/kubeval.tgz"
Zack Williams04575aa2022-03-19 21:51:44 -070057
58- name: Unarchive kubeval
59 unarchive:
Zack Williamsa3ecef42022-03-19 21:51:44 -070060 src: "{{ devtools_dist_dir }}/kubeval.tgz"
61 dest: "{{ devtools_dist_dir }}/k8s"
Zack Williams04575aa2022-03-19 21:51:44 -070062 remote_src: true
Zack Williamsa3ecef42022-03-19 21:51:44 -070063 creates: "{{ devtools_dist_dir }}/k8s/kubeval"
Zack Williams04575aa2022-03-19 21:51:44 -070064
65- name: Install kubeval binary
66 copy:
Zack Williamsa3ecef42022-03-19 21:51:44 -070067 src: "{{ devtools_dist_dir }}/k8s/kubeval"
Zack Williams04575aa2022-03-19 21:51:44 -070068 dest: /usr/local/bin/kubeval
69 mode: "0755"
70 remote_src: true
71
72# conftest
73- name: Download conftest archive
74 get_url:
75 url: "{{ devtools_conftest_url }}"
76 checksum: "{{ devtools_conftest_checksum }}"
Zack Williamsa3ecef42022-03-19 21:51:44 -070077 dest: "{{ devtools_dist_dir }}/conftest.tgz"
Zack Williams04575aa2022-03-19 21:51:44 -070078
79- name: Unarchive conftest
80 unarchive:
Zack Williamsa3ecef42022-03-19 21:51:44 -070081 src: "{{ devtools_dist_dir }}/conftest.tgz"
82 dest: "{{ devtools_dist_dir }}/k8s"
Zack Williams04575aa2022-03-19 21:51:44 -070083 remote_src: true
Zack Williamsa3ecef42022-03-19 21:51:44 -070084 creates: "{{ devtools_dist_dir }}/k8s/conftest"
Zack Williams04575aa2022-03-19 21:51:44 -070085
86- name: Install conftest binary
87 copy:
Zack Williamsa3ecef42022-03-19 21:51:44 -070088 src: "{{ devtools_dist_dir }}/k8s/conftest"
Zack Williams04575aa2022-03-19 21:51:44 -070089 dest: /usr/local/bin/conftest
90 mode: "0755"
91 remote_src: true
92
93# fleet
94- name: Download/install fleet binary
95 get_url:
96 url: "{{ devtools_fleet_url }}"
97 checksum: "{{ devtools_fleet_checksum }}"
98 dest: /usr/local/bin/fleet
99 mode: "0755"