blob: 7b36f55d7def70ceb09a609c1bb3599df08360e9 [file] [log] [blame]
Petr Ospalýfe49ee92019-04-20 00:53:01 +02001---
Michal Zegan1ec19b02019-04-30 14:52:13 +02002- name: "Check if rke is deployed"
3 command: "rke version"
4 args:
5 chdir: "{{ cluster_config_dir }}"
6 failed_when: false
7 changed_when: false
8 register: rke_deployed
9
Petr Ospalýfe49ee92019-04-20 00:53:01 +020010- name: Run rke up
11 command: "{{ rke_bin_dir }}/rke up --config cluster.yml"
12 args:
13 chdir: "{{ cluster_config_dir }}"
Michal Zegan1ec19b02019-04-30 14:52:13 +020014 when: rke_deployed.rc != 0 or cluster_yml.changed # noqa 503
Michal Zegan119f7602019-04-23 16:34:58 +020015
16- name: Ensure .kube directory is present
17 file:
18 path: "{{ kube_config_dir }}"
19 state: directory
20
21- name: Setup kubeconfig
22 copy:
23 src: "{{ cluster_config_dir }}/kube_config_cluster.yml"
24 dest: "{{ kube_config_dir }}/config"
25 remote_src: true
26 mode: 0755