Skip to content

Commit

Permalink
Fix: k8s_cluster => k3s_cluster in yamls
Browse files Browse the repository at this point in the history
  • Loading branch information
morriq committed Dec 7, 2021
1 parent fa4a8be commit 93045df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ansible/roles/sample-project/tasks/create-kubeconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

- name: Use template to create kubeconfig.yaml
vars:
server: "https://{{hostvars[groups['k8s_cluster'][0]].ansible_host}}:6443"
server: "https://{{hostvars[groups['k3s_cluster'][0]].ansible_host}}:6443"
template:
src: ./templates/kubeconfig.j2
dest: /home/ubuntu/project/kubeconfig.yaml
4 changes: 2 additions & 2 deletions ansible/roles/sample-project/tasks/install-kubectl-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- name: connect to cluster and get kubeconfig
command: cat /etc/rancher/k3s/k3s.yaml
register: command_output
delegate_to: "{{groups['k8s_cluster'][0]}}"
delegate_to: "{{groups['k3s_cluster'][0]}}"
become: true

- name: Ensures /.kube dir exists
Expand All @@ -34,5 +34,5 @@
replace:
path: /.kube/config
regexp: https:\/\/127.0.0.1:6443
replace: "https://{{hostvars[groups['k8s_cluster'][0]].ansible_host}}:6443"
replace: "https://{{hostvars[groups['k3s_cluster'][0]].ansible_host}}:6443"
backup: yes

0 comments on commit 93045df

Please sign in to comment.