blob: 96b4a23d6b099046c5c69df0b5cbfaf05ff2b05d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2018
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
- hosts: kube-master
tasks:
- name: Load kud variables
include_vars:
file: kud-vars.yml
- name: Getting emco code in /opt folder
git:
repo: 'https://github.com/onap/multicloud-k8s.git'
dest: /opt/multicloud
- name: install make package for ubuntu systems
apt: name=make state=present update_cache=yes
when: ansible_distribution == "Ubuntu"
- name: install make package for centos systems
yum: name=make state=present update_cache=yes
when: ansible_distribution == "CentOS"
- name: Change the emco directory and run the command make all
command: /usr/bin/make all
register: make_all
args:
chdir: /opt/multicloud/deployments/helm/v2/emco
- debug:
var: make_all.stdout_lines
- name: Create emco namespace
shell: "/usr/local/bin/kubectl create namespace emco"
ignore_errors: True
- name: Create pod security policy role bindings
shell: "/usr/local/bin/kubectl -n emco create rolebinding psp:default:privileged --clusterrole=psp:privileged --serviceaccount=emco:default --serviceaccount=emco:emco-fluentd"
ignore_errors: True
- name: Get cluster name
shell: "kubectl -n kube-system get configmap/kubeadm-config -o yaml | grep clusterName: | awk '{print $2}'"
register: cluster_name
- name: Change the emco directory and run the command helm install
command: /usr/local/bin/helm install --namespace emco --set emco-tools.fluentd.clusterDomain={{ cluster_name.stdout }} emco dist/packages/emco-0.1.0.tgz
register: helm_install
args:
chdir: /opt/multicloud/deployments/helm/v2/emco
- debug:
var: helm_install.stdout_lines
|