Create stack bootstrap-swconfig role
[infra/stack/kubernetes.git] / playbooks / roles / bootstrap-swconfig / tasks / configure-online-deployment.yaml
1 ---
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2019 The Nordix Foundation. All rights reserved.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19
20 - name: Delete outdated engine provisioner files and folders
21   file:
22     path: "{{ item }}"
23     state: absent
24   with_items:
25     - "{{ engine_path }}/engine/provisioner"
26     - "{{ engine_path }}/engine/inventory/group_vars/all/{{ provisioner_type }}.yaml"
27
28 - name: Clone engine provisioner repository
29   git:
30     repo: "{{ provisioners[provisioner_type].src }}"
31     dest: "{{ engine_path }}/engine/provisioner"
32     version: "{{ provisioners[provisioner_type].version }}"
33     refspec: "{{ provisioners[provisioner_type].refspec | default(omit) }}"
34     force: true
35   environment:
36     http_proxy: "{{ lookup('env','http_proxy') }}"
37     https_proxy: "{{ lookup('env','https_proxy') }}"
38     no_proxy: "{{ lookup('env','no_proxy') }}"
39
40 - name: Copy engine provisioner vars file into group_vars
41   copy:
42     src: "{{ engine_path }}/engine/provisioner/vars/{{ provisioner_type }}.yaml"
43     dest: "{{ engine_path }}/engine/inventory/group_vars/all/{{ provisioner_type }}.yaml"
44     force: true
45
46 - name: Delete outdated engine installer files and folders
47   file:
48     path: "{{ item }}"
49     state: absent
50   with_items:
51     - "{{ engine_path }}/engine/installer"
52     - "{{ engine_path }}/engine/inventory/group_vars/all/{{ installer_type }}.yaml"
53
54 - name: Clone engine installer repository
55   git:
56     repo: "{{ installers[installer_type].src }}"
57     dest: "{{ engine_path }}/engine/installer"
58     version: "{{ installers[installer_type].version }}"
59     refspec: "{{ installers[installer_type].refspec | default(omit) }}"
60     force: true
61   environment:
62     http_proxy: "{{ lookup('env','http_proxy') }}"
63     https_proxy: "{{ lookup('env','https_proxy') }}"
64     no_proxy: "{{ lookup('env','no_proxy') }}"
65
66 - name: Copy engine installer vars file into group_vars
67   copy:
68     src: "{{ engine_path }}/engine/installer/vars/{{ installer_type }}.yaml"
69     dest: "{{ engine_path }}/engine/inventory/group_vars/all/{{ installer_type }}.yaml"
70     force: true
71
72 # vim: set ts=2 sw=2 expandtab: