Skip to content

Commit

Permalink
fix missing dir.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Taylor authored and Dean Taylor committed Feb 9, 2021
1 parent acfab46 commit e6eb8f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contrib/ansible/roles/k8s-dev/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
fi
dest: /etc/profile.d/KUBECONFIG.sh
- name: kubectl config for ansible user
shell: 'microk8s config | sed "s/\(user\|name\): admin/\1: microk8s-admin/" > {{ ansible_user_dir }}/.kube/microk8s.config'
shell: >
[ -d {{ ansible_user_dir }}/.kube ] || mkdir -p {{ ansible_user_dir }}/.kube; \
microk8s config | sed "s/\(user\|name\): admin/\1: microk8s-admin/" > {{ ansible_user_dir }}/.kube/microk8s.config
args:
creates: "{{ ansible_user_dir }}/.kube/microk8s.config"
- name: Wait for microk8s to start
Expand Down

0 comments on commit e6eb8f3

Please sign in to comment.