Git Product home page Git Product logo

Comments (4)

JM1 avatar JM1 commented on July 1, 2024 1

Nice to hear that you found my collection 😄

from ansible-collection-jm1-libvirt.

wsidl avatar wsidl commented on July 1, 2024

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.

wsidl avatar wsidl commented on July 1, 2024

Issue was an incomplete statement after this section. No longer needed.

Weird error response!!

from ansible-collection-jm1-libvirt.

wsidl avatar wsidl commented on July 1, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.