jm1 / ansible-collection-jm1-libvirt Goto Github PK
View Code? Open in Web Editor NEWAnsible Collection for using libvirt https://galaxy.ansible.com/jm1/libvirt
License: GNU General Public License v3.0
Ansible Collection for using libvirt https://galaxy.ansible.com/jm1/libvirt
License: GNU General Public License v3.0
ansible-collection-jm1-libvirt/plugins/modules/domain.py
Lines 200 to 205 in e119ccf
In case the user does not override all of the default fields. Would that be better in Ansible or python?
ansible-collection-jm1-libvirt/plugins/modules/domain.py
Lines 95 to 110 in e119ccf
I am trying to run and adapt this for Fedora, and there are some issues with newer libvirt versions:
os-variant
is required. This can easily be fixed by adding a default "detect=on"disk
is not defined or called in the command. Maybe I am misreading the flow of the program there but shouldn't it have an additional argument disk
where the Ansible variable volume
is passed?Also it makes more sense for the volume
variable to default to {{ domain }}.{{ volume_format }}
instead of {{ inventory_hostname }}.{{ volume_format }}
When creating a domain using jm1.libvirt.domain
, the hardware arguments must be a dict of (str, str) values. In some cases, the value side of the dict requires multiple parameters for that argument:
--network network=default,mac=52:54:00:aa:bb:cc,model=virtio
Adding these types of arguments to the yaml playbook using this module raises an error saying the value for this argument is in Key=Value Shorthand and not YAML:
ERROR! no module/action detected in task.
The error appears to be in '/my/playbook.yml': line 113, column 30, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- network: "network=os_net,mac=52:54:00:aa:bb:cc,model=virtio"
^ here
There appears to be both 'k=v' shorthand syntax and YAML in this task. Only one syntax may be used.
Python 3.9.7
Ansible Core 2.11.5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.