Skip to content

Commit

Permalink
Fixes needed to upgrade 0.6.0 to 0.7.0 (hitachienergy#1405)
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
rafzei authored Jun 30, 2020
1 parent 92cc58b commit 9fdd47b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@
remote_src: true
owner: "{{ admin_user.name }}"
group: "{{ admin_user.name }}"

- name: Slurp .kube/config
slurp:
src: "/home/{{ admin_user.name }}/.kube/config"
register: kube_config
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
delegate_to: "{{ groups['kubernetes_master'][0] }}"

- name: Include get-cluster-version.yml
include_tasks: kubernetes/get-cluster-version.yml # sets cluster_version
import_tasks: kubernetes/get-cluster-version.yml # sets cluster_version
delegate_to: "{{ groups['kubernetes_master'][0] }}"

- name: Include get-kubelet-version.yml
include_tasks: kubernetes/get-kubelet-version.yml # sets kubelet_version
import_tasks: kubernetes/get-kubelet-version.yml # sets kubelet_version
delegate_to: "{{ groups['kubernetes_master'][0] }}"

- name: Upgrade master to v{{ version }}
include_tasks: kubernetes/upgrade-master.yml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: Create .kube directory
file:
path: "/home/{{ admin_user.name }}/.kube/"
state: directory
owner: "{{ admin_user.name }}"
group: "{{ admin_user.name }}"

- name: Provide .kube/config
copy:
dest: "/home/{{ admin_user.name }}/.kube/config"
content: "{{ hostvars[groups.kubernetes_master.0].kube_config.content | b64decode }}"
8 changes: 8 additions & 0 deletions core/src/epicli/data/common/ansible/playbooks/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
name: upgrade
tasks_from: ensure-kubeconfig

- hosts: kubernetes_node
become: true
become_method: sudo
tasks:
- import_role:
name: upgrade
tasks_from: provide-kubeconfig

- hosts: all
become: true
become_method: sudo
Expand Down

0 comments on commit 9fdd47b

Please sign in to comment.