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.
16 # tasks file for MUNO controller
18 ### MUNO controller installation ###
20 - name: Create directory to download EG-TAR
21 command: mkdir -p /tmp/eg_download/deploy
23 chdir: "{{playbook_dir}}"
26 - name: Check edgegallery tar ball present
28 path: /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86.tar.gz
31 - name: Download 1.1 edgegallery x86 controller
32 # yamllint disable rule:line-length
33 command: wget https://edgegallery.obs.cn-east-3.myhuaweicloud.com/releases/v1.3.2/x86/EdgeGallery-v1.3.2-controller-x86.tar.gz
34 # yamllint disable rule:line-length
36 chdir: /tmp/eg_download/deploy/
37 when: not tar_var.stat.exists
39 - name: Untar Edgegallery offline controller tar file
40 command: tar -xvf EdgeGallery-v1.3.2-controller-x86
42 chdir: /tmp/eg_download/deploy/
43 when: not tar_var.stat.exists
45 - name: Set inventory file for muno controller
46 # yamllint disable rule:line-length
47 command: cp muno-config/controller/hosts-muno-controller /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86/install
48 # yamllint disable rule:line-length
50 chdir: "{{playbook_dir}}"
52 - name: Set var.yml file for muno controller
53 # yamllint disable rule:line-length
54 command: cp muno-config/controller/var.yml /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86/install
55 # yamllint disable rule:line-length
57 chdir: "{{playbook_dir}}"
59 - name: Install edgegallery controller
61 # yamllint disable rule:line-length
62 cmd: ansible-playbook --inventory hosts-muno-controller -e "ansible_user=root" eg_controller_aio_install.yml >> muno_controller_log
63 # yamllint disable rule:line-length
64 chdir: /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86/install
65 when: ansible_architecture == 'x86_64'