-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from rancherfederal/219-automate-the-configur…
…ation-of-kubectlctrcri 219 automate the configuration of kubectlctrcri
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
|
||
- name: Add /var/lib/rancher/rke2/bin to PATH | ||
ansible.builtin.lineinfile: | ||
dest: "/root/.bashrc" | ||
line: 'PATH=$PATH:/var/lib/rancher/rke2/bin' | ||
insertafter: EOF | ||
|
||
- name: Symlink crictl config to /etc/crictl.yaml | ||
ansible.builtin.file: | ||
src: "/var/lib/rancher/rke2/agent/etc/crictl.yaml" | ||
dest: "/etc/crictl.yaml" | ||
state: link | ||
|
||
- name: Create .kube directory in /root | ||
ansible.builtin.file: | ||
path: /root/.kube | ||
state: directory | ||
mode: '0750' | ||
|
||
- name: Symlink kubectl config to /root/.kube/config | ||
ansible.builtin.file: | ||
src: "/var/lib/rancher/rke2/server/cred/admin.kubeconfig" | ||
dest: "/root/.kube/config" | ||
state: link |