homeserver/roles/pandemonium1986.ansible-role-k9s/tasks/main.yml
mg 135bd53414 k3s - Basics (#423)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: #423
2022-11-04 20:58:37 +01:00

29 lines
795 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 }}"
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