25ee0241e2279b9a0b9a75e7a7566cecf7bd6f1b
[ealt-edge.git] / ocd / infra / playbooks / roles / egallery-tar / 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 - name: Create directory to download EG-TAR
17   command: mkdir -p /tmp/eg_download/deploy
18   args:
19     chdir: "{{playbook_dir}}"
20   ignore_errors: yes
21
22 - name: Download 1.3.2 edgegallery x86
23 # yamllint disable rule:line-length
24   command: wget http://edgegallery-v1.3.2.obs.cn-north-4.myhuaweicloud.com/x86/EdgeGallery-v1.3.2-all-x86.tar.gz
25 # yamllint disable rule:line-length
26   args:
27     chdir: /tmp/eg_download/deploy/
28   when: ansible_architecture == 'x86_64'
29
30 - name: Untar Edgegallery offline tarbal file
31   command: tar -xvf EdgeGallery-v1.3.2-all-x86.tar.gz
32   args:
33     chdir: /tmp/eg_download/deploy/
34   when: ansible_architecture == 'x86_64'
35
36 - name: Set inventory file for aio
37   command: cp hosts-aio /tmp/eg_download/deploy/EdgeGallery-v1.3.2-all-x86/install
38   args:
39     chdir: "{{playbook_dir}}"
40   when: ansible_architecture == 'x86_64'
41
42 - name: Set var.yml to eg path
43   # yamllint disable rule:line-length
44   command: cp var.yml /tmp/eg_download/deploy/EdgeGallery-v1.3.2-all-x86/install
45   # yamllint disable rule:line-length
46   args:
47     chdir: "{{playbook_dir}}"
48   when: ansible_architecture == 'x86_64'
49
50 - name: Set default-var.yml to eg path
51    # yamllint disable rule:line-length
52   command: cp default-var.yml /tmp/eg_download/deploy/EdgeGallery-v1.3.2-all-x86/install
53   # yamllint disable rule:line-length
54   args:
55     chdir: "{{playbook_dir}}"
56   when: ansible_architecture == 'x86_64'
57
58 - name: Set password-var.yml to eg path
59   # yamllint disable rule:line-length
60   command: cp password-var.yml /tmp/eg_download/deploy/EdgeGallery-v1.3.2-all-x86/install
61   # yamllint disable rule:line-length
62   args:
63     chdir: "{{playbook_dir}}"
64   when: ansible_architecture == 'x86_64'