-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.yml
More file actions
34 lines (30 loc) · 820 Bytes
/
Copy pathinstall.yml
File metadata and controls
34 lines (30 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
- name: Download k9s
ansible.builtin.get_url:
url: "{{ k9s_url }}"
dest: /tmp/k9s.tar.gz
mode: "0644"
timeout: 120 # ~40MB file, give it extra time
register: k9s_download
retries: 3 # retry up to 3 times on network blips
delay: 5
until: k9s_download is succeeded
- name: Extract k9s
ansible.builtin.unarchive:
src: /tmp/k9s.tar.gz
dest: /tmp/
remote_src: true
- name: Install the k9s binary
become: true # only writing to /usr/local/bin needs root
ansible.builtin.copy:
src: /tmp/k9s
dest: "{{ k9s_bin_dir }}/k9s"
mode: "0755"
remote_src: true
- name: Check the k9s version
ansible.builtin.command: k9s version
register: k9s_check
changed_when: false
- name: Print the k9s version
ansible.builtin.debug:
msg: "{{ k9s_check.stdout_lines }}"