diff options
Diffstat (limited to 'ansible/roles/rke')
-rw-r--r-- | ansible/roles/rke/defaults/main.yml | 2 | ||||
-rw-r--r-- | ansible/roles/rke/tasks/rke_deploy.yml | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/ansible/roles/rke/defaults/main.yml b/ansible/roles/rke/defaults/main.yml index 3e1c26a6..cbf03b74 100644 --- a/ansible/roles/rke/defaults/main.yml +++ b/ansible/roles/rke/defaults/main.yml @@ -2,8 +2,10 @@ rke_binary: rke rke_username: rke rke_bin_dir: /usr/local/bin +kube_config_dir: "{{ ansible_env.HOME }}/.kube" cluster_config_dir: "{{ app_data_path }}/cluster" rke: + # rke (rancher) images etcd: rancher/coreos-etcd:v3.2.24-rancher1 alpine: rancher/rke-tools:v0.1.27 nginx_proxy: rancher/rke-tools:v0.1.27 diff --git a/ansible/roles/rke/tasks/rke_deploy.yml b/ansible/roles/rke/tasks/rke_deploy.yml index 7b3e2510..9983d08a 100644 --- a/ansible/roles/rke/tasks/rke_deploy.yml +++ b/ansible/roles/rke/tasks/rke_deploy.yml @@ -3,3 +3,15 @@ command: "{{ rke_bin_dir }}/rke up --config cluster.yml" args: chdir: "{{ cluster_config_dir }}" + +- name: Ensure .kube directory is present + file: + path: "{{ kube_config_dir }}" + state: directory + +- name: Setup kubeconfig + copy: + src: "{{ cluster_config_dir }}/kube_config_cluster.yml" + dest: "{{ kube_config_dir }}/config" + remote_src: true + mode: 0755 |