Comments (4)
Nice to hear that you found my collection 😄
from ansible-collection-jm1-libvirt.
Potential solution would be to breakdown the module_utils/libvirt.py:to_cli_args
function to further test if the value is a dict-type and parse them into a string suitable for the cli:
- network:
- network: "default"
- mac: "54:52:00:aa:bb:cc"
- model: "virtio"
The function would test for the value type and join them into the appropriate string:
values = value
if isinstance(value, list):
values = []
for _value in value:
if isinstance(_value, dict):
values.append(",".join([f"{_k}={_v}" for _k, _v in _value]))
else:
values.append(str(_value))
values = ",".join(values)
cli_args += ['--%s' % key.replace('_', '-'), values]
This is untested, but should provide the idea
from ansible-collection-jm1-libvirt.
Issue was an incomplete statement after this section. No longer needed.
Weird error response!!
from ansible-collection-jm1-libvirt.
I have to say good job on it, it's so far the only collection that does what I want it to do (similar to one for Terraform). A couple of "nice to haves" can be provided if you're interested.
from ansible-collection-jm1-libvirt.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-collection-jm1-libvirt.