blob: 75d86e02544a88d6a3613f40c2ca134b1b6d704b [file] [log] [blame]
Fatih Degirmenci50b146b2019-05-10 14:11:57 +02001---
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- name: Gather data from PDF and IDF
20 set_fact:
21 num_nodes: "{{ nodes | length }}"
22 vms: "{{ idf[installer_type].hostnames }}"
23 networks: "{{ idf[installer_type].network }}"
24
25- include_tasks: create-libvirt-pool.yml
26
27- name: Stop existing virtualbmc processes
28 command: killall -w vbmc
Fatih Degirmencidf251d52019-12-11 13:43:10 +010029 args:
30 removes: "{{ ansible_env.HOME }}/.vbmc/master.pid"
Fatih Degirmencif9cf5492020-01-12 22:35:53 +000031 ignore_errors: true
Fatih Degirmenci50b146b2019-05-10 14:11:57 +020032
33- name: Remove outdated virtualbmc folder
34 file:
35 path: "{{ ansible_env.HOME }}/.vbmc/"
36 state: absent
37
Vamsi Savaramce368012019-08-07 09:09:42 +000038- name: Create virtualbmc folder
39 file:
40 path: "{{ ansible_env.HOME }}/.vbmc/"
41 state: directory
42
43- name: Create vbmc configuration
44 template:
Fatih Degirmencif9cf5492020-01-12 22:35:53 +000045 src: virtualbmc.conf.j2
Vamsi Savaramce368012019-08-07 09:09:42 +000046 dest: "{{ ansible_env.HOME }}/.vbmc/virtualbmc.conf"
47
Fatih Degirmenci50b146b2019-05-10 14:11:57 +020048- include_tasks: create-libvirt-vms.yml
49 with_dict: "{{ vms }}"
50 loop_control:
51 loop_var: vm
52
53# vim: set ts=2 sw=2 expandtab: