diff options
Diffstat (limited to 'deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks')
-rw-r--r-- | deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks/main.yml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks/main.yml index 3feca3e5..1c691b8e 100644 --- a/deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks/main.yml +++ b/deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks/main.yml @@ -14,3 +14,42 @@ dest: /opt/admin.conf flat: "yes" when: inventory_hostname == groups['kube_master'][0] + +- name: Create heapster dest directory + file: + path: "{{local_release_dir}}/heapster" + state: directory + recurse: "yes" + when: + - heapster.enabled + - inventory_hostname == groups['kube_master'][0] + +- name: get the package of heapster + get_url: + url: "{{heapster_download_url}}" + dest: "{{local_release_dir}}/heapster" + owner: "{{ heapster.owner|default(omit) }}" + mode: "{{ heapster.mode|default(omit) }}" + register: get_url_result + until: "'OK' in get_url_result.msg or 'file already exists' in get_url_result.msg" + retries: 4 + delay: "{{ retry_stagger | random + 3 }}" + when: + - heapster.enabled + - inventory_hostname == groups['kube_master'][0] + +- name: untar the file of heapster + shell: | + cd "{{ local_release_dir }}/heapster"; + tar zxvf "heapster-{{ heapster.version }}.tar.gz" + when: + - heapster.enabled + - inventory_hostname == groups['kube_master'][0] + +- name: install the heapster + shell: | + cd "{{ local_release_dir }}/heapster/heapster-{{ heapster.version }}/deploy/"; + ./kube.sh start + when: + - heapster.enabled + - inventory_hostname == groups['kube_master'][0] |