homeserver/roles/pandemonium1986.ansible-role-k9s/tasks/main.yml
mg 2b3921aa21 Rolle aktualisiert: k9s (#458)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: #458
2023-02-17 11:57:35 +01:00

29 lines
889 B
YAML

---
- name: Ensure k9s directories are created
file:
path: "{{ item }}"
state: directory
mode: "0755"
loop:
- "{{ k9s_cache_path }}"
- "{{ k9s_installation_path }}"
- 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"
- name: Unarchive k9s archive into k9s_installation_path
unarchive:
src: "{{ k9s_cache_path }}/{{ asset_name }}"
dest: "{{ k9s_installation_path }}"
remote_src: true
mode: "0755"
- name: Ensure k9s link is created
file:
src: "{{ k9s_installation_path }}/{{ binary_name }}"
dest: "/usr/local/bin/{{ binary_name }}"
state: link