Private insecure-registries functionality added
[ealt-edge.git] / ocd / infra / playbooks / roles / eg_prerequisite / tasks / install.yml
1 #
2 # Copyright 2020 Huawei Technologies Co., Ltd.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16
17 ---
18 - name: Doing deployment setup for edge gallery
19   copy:
20     src: deploy
21     dest: /tmp/eg_prerequisite/
22
23 - name: Import config file
24   include_vars:
25     file: ../../../config.yml
26     name: vardata
27
28 - name: Replacing private ip
29   replace:
30     path: /tmp/eg_prerequisite/deploy/eg_daemon.sh
31     regexp: REGISTRIES_IP
32     replace: "{{ vardata.private_repo_ip.name }}"
33
34 - name: Replacing private port
35   replace:
36     path: /tmp/eg_prerequisite/deploy/eg_daemon.sh
37     regexp: REGISTRIES_PORT
38     replace: "{{ vardata.docker_registry_port.name }}"
39
40 - name: Execute script for docker daemon
41   command: sh /tmp/eg_prerequisite/deploy/eg_daemon.sh
42
43 - name: Certificate copy
44   debug:
45     msg: Copy certificate from ocd to center and edge
46
47 - synchronize:
48     src: /tmp/ssl-eg-keys-certs
49     dest: /tmp/