1 # Copyright 2021 Huawei Technologies Co., Ltd.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 ### MUNO edge installation ###
17 - name: Check edgegallery tar ball present
19 path: /tmp/eg_download/deploy/EdgeGallery-v1.3.0-edge-x86.tar.gz
20 register: edge_tar_var
22 - name: Download 1.3 edgegallery x86 edge
23 # yamllint disable rule:line-length
24 command: wget http://edgegallery-v1.3.0.obs.cn-north-4.myhuaweicloud.com/x86/EdgeGallery-v1.3.0-edge-x86.tar.gz
25 # yamllint disable rule:line-length
27 chdir: /tmp/eg_download/deploy/
28 when: not edge_tar_var.stat.exists
30 - name: Untar Edgegallery offline edge tar file
31 command: tar -xvf EdgeGallery-v1.3.0-edge-x86.tar.gz
33 chdir: /tmp/eg_download/deploy/
34 when: not edge_tar_var.stat.exists
36 - name: Set inventory file for muno edge
37 # yamllint disable rule:line-length
38 command: scp root@{{ OCD_IP }}:"{{playbook_dir}}"/muno-config/edge/hosts-muno-edge .
39 # yamllint disable rule:line-length
41 chdir: "{{playbook_dir}}"
43 - name: Set var.yml file for muno edge
44 # yamllint disable rule:line-length
45 command: scp root@{{ OCD_IP }}:"{{playbook_dir}}"/muno-config/edge/var.yml .
46 # yamllint disable rule:line-length
48 chdir: "{{playbook_dir}}"
50 - name: Install edgegallery edge
52 # yamllint disable rule:line-length
53 cmd: ansible-playbook --inventory hosts-muno-edge -e "ansible_user=root" eg_edge_aio_install.yml >> muno_edge_log
54 # yamllint disable rule:line-length
55 chdir: /tmp/eg_download/deploy/EdgeGallery-v1.3.0-edge-x86/install
56 when: ansible_architecture == 'x86_64'