Git Product home page Git Product logo

ansible-collection-jm1-libvirt's People

Contributors

jm1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lecrisut

ansible-collection-jm1-libvirt's Issues

Missing required arguments

# Prepare virt-install options
virt_install_args = libvirt_utils.to_cli_args(hardware)
# Do not boot domain, just define it
virt_install_args.extend(['--import', '--noreboot', '--noautoconsole'])
# Define domain
cmd = """
virt-install
--connect '{uri}'
--name '{domain_name}'
{virt_install_args}
""".replace('\n', ' ').format(
uri=uri,
domain_name=domain_name,
virt_install_args=' '.join(virt_install_args))

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 }}

Command Arguments breaks YAML syntax parsing

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

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.