Fatih Degirmenci | 50b146b | 2019-05-10 14:11:57 +0200 | [diff] [blame] | 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 | - hosts: localhost |
| 21 | connection: local |
Fatih Degirmenci | f9cf549 | 2020-01-12 22:35:53 +0000 | [diff] [blame] | 22 | become: true |
Fatih Degirmenci | 50b146b | 2019-05-10 14:11:57 +0200 | [diff] [blame] | 23 | gather_facts: true |
Fatih Degirmenci | 50b146b | 2019-05-10 14:11:57 +0200 | [diff] [blame] | 24 | |
| 25 | roles: |
| 26 | - role: prepare-libvirt |
| 27 | - role: create-libvirt-networks |
| 28 | - role: create-libvirt-vms |
| 29 | |
| 30 | tasks: |
| 31 | - name: Get libvirt networks |
| 32 | command: virsh net-list --all |
| 33 | register: libvirt_networks |
Fatih Degirmenci | df251d5 | 2019-12-11 13:43:10 +0100 | [diff] [blame] | 34 | changed_when: false |
Fatih Degirmenci | 50b146b | 2019-05-10 14:11:57 +0200 | [diff] [blame] | 35 | |
| 36 | - name: List libvirt networks |
| 37 | debug: |
| 38 | msg: "{{ libvirt_networks.stdout_lines }}" |
| 39 | |
| 40 | - name: Get libvirt vms |
| 41 | command: virsh list --all |
| 42 | register: libvirt_vms |
Fatih Degirmenci | df251d5 | 2019-12-11 13:43:10 +0100 | [diff] [blame] | 43 | changed_when: false |
Fatih Degirmenci | 50b146b | 2019-05-10 14:11:57 +0200 | [diff] [blame] | 44 | |
| 45 | - name: List libvirt vms |
| 46 | debug: |
| 47 | msg: "{{ libvirt_vms.stdout_lines }}" |
| 48 | |
| 49 | - name: Get list of nodes from vbmc |
| 50 | command: vbmc list |
Fatih Degirmenci | df251d5 | 2019-12-11 13:43:10 +0100 | [diff] [blame] | 51 | register: vbmc_vms |
| 52 | changed_when: false |
Fatih Degirmenci | 50b146b | 2019-05-10 14:11:57 +0200 | [diff] [blame] | 53 | environment: |
Vamsi Savaram | 6580c93 | 2019-08-06 12:42:02 +0000 | [diff] [blame] | 54 | PATH: "{{ engine_venv }}/bin" |
Fatih Degirmenci | 50b146b | 2019-05-10 14:11:57 +0200 | [diff] [blame] | 55 | |
| 56 | - name: List vbmc nodes |
| 57 | debug: |
| 58 | msg: "{{ vbmc_vms.stdout_lines }}" |
| 59 | |
| 60 | # vim: set ts=2 sw=2 expandtab: |