38e1fa208e2d25db3ef136a1cbc73fbb562006b4
[eliot.git] / blueprints / iotgateway / playbooks / roles / vault / tasks / install.yml
1 # Copyright 2020 Huawei Technologies Co., Ltd.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 - name: "INSTALL: Add Vault repo"
16 # yamllint disable rule:line-length
17   command: helm repo add hashicorp https://helm.releases.hashicorp.com
18 # yamllint disable rule:line-length
19
20 - name: "INSTALL: Vault "
21   command: helm install vault hashicorp/vault
22
23
24 - name: "Installing ...Vault "
25   command: sleep 10
26
27 - name: "Initialize Vault POD and Unseal Key"
28   shell:
29 # yamllint disable rule:line-length
30     cmd: kubectl exec -ti vault-0 -- vault operator unseal $(kubectl exec vault-0 -- vault operator init -key-shares=1 -key-threshold=1 -format="" | grep -i "unseal key 1" | awk  '{print $4}')
31 # yamllint enable rule:line-length