-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathmain.yml
More file actions
37 lines (33 loc) · 936 Bytes
/
Copy pathmain.yml
File metadata and controls
37 lines (33 loc) · 936 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
35
36
37
---
- name: Install prerequisite packages
homebrew:
name:
- coreutils
- fzf
- gnu-tar
- jq
state: latest
# https://kubernetes.io/releases/
# https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/
- name: Download kubectl
shell: sh -c 'curl -LO "https://dl.k8s.io/release/v1.35.6/bin/darwin/$(arch)/kubectl"'
args:
chdir: /tmp
creates: /usr/local/bin/kubectl
- name: Install kubectl
command: sudo mv /tmp/kubectl /usr/local/bin
args:
chdir: /tmp
creates: /usr/local/bin/kubectl
# https://github.com/derailed/k9s
- name: Install k9s
homebrew:
name:
- derailed/k9s/k9s
state: latest
- name: Ensure Kubernetes environment is sourced in .zshrc
lineinfile:
dest: "{{ REPO_ROOT }}/dotfiles/.zshrc"
line: "source {{ REPO_ROOT }}/playbooks/roles/kubernetes/files/k8s_profile.sh"
state: present
when: ansible_facts["env"]["SHELL"] == "/bin/zsh"