blob: 36d1129091b6996ab56b295a0d54e8e2ccd12e30 [file] [log] [blame]
---
# devtools tasks/k8s.yml
#
# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: create k8s sub dir in dist dir
file:
dest: "{{ devtools_dist_dir }}/k8s"
state: directory
owner: root
group: root
mode: 0755
# kubectl
- name: Download/install kubectl binary
get_url:
url: "{{ devtools_kubectl_url }}"
checksum: "{{ devtools_kubectl_checksum }}"
dest: /usr/local/bin/kubectl
mode: "0755"
# kind
- name: Download/install kind binary
get_url:
url: "{{ devtools_kind_url }}"
checksum: "{{ devtools_kind_checksum }}"
dest: /usr/local/bin/kind
mode: "0755"
# helm
- name: Download helm archive
get_url:
url: "{{ devtools_helm_url }}"
checksum: "{{ devtools_helm_checksum }}"
dest: "{{ devtools_dist_dir }}/helm.tgz"
- name: Unarchive helm
unarchive:
src: "{{ devtools_dist_dir }}/helm.tgz"
dest: "{{ devtools_dist_dir }}/k8s"
remote_src: true
- name: Install helm binary
copy:
src: "{{ devtools_dist_dir }}/k8s/linux-amd64/helm"
dest: /usr/local/bin/helm
mode: "0755"
remote_src: true
# kubeval
- name: Download kubeval archive
get_url:
url: "{{ devtools_kubeval_url }}"
checksum: "{{ devtools_kubeval_checksum }}"
dest: "{{ devtools_dist_dir }}/kubeval.tgz"
- name: Unarchive kubeval
unarchive:
src: "{{ devtools_dist_dir }}/kubeval.tgz"
dest: "{{ devtools_dist_dir }}/k8s"
remote_src: true
creates: "{{ devtools_dist_dir }}/k8s/kubeval"
- name: Install kubeval binary
copy:
src: "{{ devtools_dist_dir }}/k8s/kubeval"
dest: /usr/local/bin/kubeval
mode: "0755"
remote_src: true
# conftest
- name: Download conftest archive
get_url:
url: "{{ devtools_conftest_url }}"
checksum: "{{ devtools_conftest_checksum }}"
dest: "{{ devtools_dist_dir }}/conftest.tgz"
- name: Unarchive conftest
unarchive:
src: "{{ devtools_dist_dir }}/conftest.tgz"
dest: "{{ devtools_dist_dir }}/k8s"
remote_src: true
creates: "{{ devtools_dist_dir }}/k8s/conftest"
- name: Install conftest binary
copy:
src: "{{ devtools_dist_dir }}/k8s/conftest"
dest: /usr/local/bin/conftest
mode: "0755"
remote_src: true
# fleet
- name: Download/install fleet binary
get_url:
url: "{{ devtools_fleet_url }}"
checksum: "{{ devtools_fleet_checksum }}"
dest: /usr/local/bin/fleet
mode: "0755"