munomode
[ealt-edge.git] / ocd / infra / playbooks / roles / egallery-munomode-edge / tasks / install.yml
1 # Copyright 2021 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 ---
16 ### MUNO edge installation ###
17
18 - name: Download 1.1 edgegallery x86 edge
19 # yamllint disable rule:line-length
20   command: wget https://edgegallery.obs.cn-east-3.myhuaweicloud.com/releases/v1.1.1/x86/EdgeGallery-v1.1.1-edge-x86.tar.gz
21 # yamllint disable rule:line-length
22   args:
23     chdir: /tmp/eg_download/deploy/
24   when: ansible_architecture == 'x86_64'
25
26 - name: Untar Edgegallery offline edge tar file
27   command: tar -xvf EdgeGallery-v1.1.1-edge-x86
28   args:
29     chdir: /tmp/eg_download/deploy/
30   when: ansible_architecture == 'x86_64'
31
32 - name: Set inventory file for muno edge
33 # yamllint disable rule:line-length
34   command: scp root@{{ OCD_IP }}:"{{playbook_dir}}"/muno-config/edge/hosts-muno-edge .
35 # yamllint disable rule:line-length
36   args:
37     chdir: /tmp/eg_download/deploy/EdgeGallery-v1.1.1-edge-x86/install
38
39 - name: Set var.yml file for muno edge
40 # yamllint disable rule:line-length
41   command: scp root@{{ OCD_IP }}:"{{playbook_dir}}"/muno-config/edge/var.yml .
42 # yamllint disable rule:line-length
43   args:
44     chdir: /tmp/eg_download/deploy/EdgeGallery-v1.1.1-edge-x86/install
45
46 - name: Install edgegallery edge
47   shell:
48     # yamllint disable rule:line-length
49     cmd: ansible-playbook --inventory hosts-muno-edge -e "ansible_user=root" eg_edge_aio_install.yml >> muno_edge_log
50     # yamllint disable rule:line-length
51     chdir: /tmp/eg_download/deploy/EdgeGallery-v1.1.1-edge-x86/install
52   when: ansible_architecture == 'x86_64'