https://github.com/virt-lightning/ansible-collection-virt-lightning
Ansible Collection that provides an inventory and module plugin
https://github.com/virt-lightning/ansible-collection-virt-lightning
Last synced: 3 months ago
JSON representation
Ansible Collection that provides an inventory and module plugin
- Host: GitHub
- URL: https://github.com/virt-lightning/ansible-collection-virt-lightning
- Owner: virt-lightning
- Created: 2019-04-17T15:11:51.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-27T21:37:17.000Z (over 1 year ago)
- Last Synced: 2024-10-28T01:34:12.111Z (over 1 year ago)
- Language: Python
- Size: 45.9 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Virt-Lightning's Ansible collection
## Purpose
This module extends Ansible feature to provide two additional plugins. These
plugins allow you to consume the `virt-lightning` inventory and manage new
virtual machine:
## Example
```yaml
---
- hosts: localhost
collections:
- virt_lightning.virt_lightning
tasks:
- name: Create the Debian 10 VM
vm:
distro: debian-10
name: myvm
state: present
- name: Refresh inventory to ensure new instance exists in inventory
meta: refresh_inventory
- debug: var=hostvars.myvm
- name:
command: uname -a
delegate_to: myvm
- name: Destroy the VM
vm:
name: myvm
state: absent
```
## Requirements
- Libvirt
- Linux
VirtLightning should already be installed in your virtualenv, the following command
should not raise any error: `python -m virt_lightning.virt_lightning`
If it's not the case, just follow the installation procedure here: https://virt-lightning.github.io/virt-lightning/
## Installation
```shell
ansible-galaxy collection install virt_lightning.virt_lightning
```
You can test your installation with the two samples playbooks.