Update plugin.sh with new helper functions
[multicloud/k8s.git] / kud / deployment_infra / playbooks / configure-kud.yml
1 ---
2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2018
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10 - hosts: localhost
11   pre_tasks:
12     - name: Load kud variables
13       include_vars:
14         file: kud-vars.yml
15     - name: Check if helm client is already installed #It is in single node deployment
16       command: helm version -c
17       register: helm_client
18       failed_when: False
19       changed_when: False
20       check_mode: False
21   roles:
22     - name: andrewrothstein.kubernetes-helm
23       when: helm_client.rc != 0
24       vars:
25           kubernetes_helm_ver: "v{{ helm_client_version }}"
26   tasks:
27     - name: Initialize helm client
28       command: helm init -c
29       args:
30         creates: ~/.helm
31
32 - hosts: kube-node
33   become: yes
34   tasks:
35     - name: copy admin.conf file to kube-nodes
36       copy:
37         src: "{{ lookup('env','kud_inventory_folder') }}/artifacts/admin.conf"
38         dest: "/etc/kubernetes/admin.conf"