2022-11-04 20:58:37 +01:00
|
|
|
---
|
2023-02-17 11:57:35 +01:00
|
|
|
- name: Ensure k9s directories are created
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
mode: "0755"
|
|
|
|
loop:
|
|
|
|
- "{{ k9s_cache_path }}"
|
|
|
|
- "{{ k9s_installation_path }}"
|
2022-11-04 20:58:37 +01:00
|
|
|
|
2023-02-17 11:57:35 +01:00
|
|
|
- name: Ensure k9s is installed
|
|
|
|
get_url:
|
|
|
|
url: "{{ source_url }}/{{ github_namespace }}/releases/download/{{ k9s_version }}/{{ asset_name }}"
|
|
|
|
dest: "{{ k9s_cache_path }}"
|
|
|
|
checksum: "{{ k9s_checksum }}"
|
|
|
|
mode: "0755"
|
2022-11-04 20:58:37 +01:00
|
|
|
|
2023-02-17 11:57:35 +01:00
|
|
|
- name: Unarchive k9s archive into k9s_installation_path
|
|
|
|
unarchive:
|
|
|
|
src: "{{ k9s_cache_path }}/{{ asset_name }}"
|
|
|
|
dest: "{{ k9s_installation_path }}"
|
|
|
|
remote_src: true
|
|
|
|
mode: "0755"
|
2022-11-04 20:58:37 +01:00
|
|
|
|
2023-02-17 11:57:35 +01:00
|
|
|
- name: Ensure k9s link is created
|
|
|
|
file:
|
|
|
|
src: "{{ k9s_installation_path }}/{{ binary_name }}"
|
|
|
|
dest: "/usr/local/bin/{{ binary_name }}"
|
|
|
|
state: link
|