{"id":13821344,"url":"https://github.com/ansible-community/molecule-libvirt","last_synced_at":"2025-09-29T10:30:41.470Z","repository":{"id":37955231,"uuid":"227794817","full_name":"ansible-community/molecule-libvirt","owner":"ansible-community","description":"Molecule LibVirt Provider","archived":true,"fork":false,"pushed_at":"2022-12-26T19:43:35.000Z","size":57,"stargazers_count":35,"open_issues_count":7,"forks_count":19,"subscribers_count":20,"default_branch":"main","last_synced_at":"2024-09-22T13:32:50.708Z","etag":null,"topics":["ansible","hacktoberfest","libvirt","molecule","molecule-driver"],"latest_commit_sha":null,"homepage":"https://github.com/ansible-community/molecule-libvirt/issues/13#issuecomment-1372615418","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ansible-community.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2019-12-13T08:42:43.000Z","updated_at":"2023-07-18T18:07:06.000Z","dependencies_parsed_at":"2023-01-31T01:00:50.774Z","dependency_job_id":null,"html_url":"https://github.com/ansible-community/molecule-libvirt","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-community%2Fmolecule-libvirt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-community%2Fmolecule-libvirt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-community%2Fmolecule-libvirt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-community%2Fmolecule-libvirt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ansible-community","download_url":"https://codeload.github.com/ansible-community/molecule-libvirt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219874048,"owners_count":16554541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","hacktoberfest","libvirt","molecule","molecule-driver"],"created_at":"2024-08-04T08:01:20.388Z","updated_at":"2025-09-29T10:30:36.198Z","avatar_url":"https://github.com/ansible-community.png","language":"Python","funding_links":[],"categories":["hacktoberfest"],"sub_categories":[],"readme":"***********************\nMolecule libvirt Plugin\n***********************\n\n.. image:: https://badge.fury.io/py/molecule-libvirt.svg\n   :target: https://badge.fury.io/py/molecule-libvirt\n   :alt: PyPI Package\n\n.. image:: https://zuul-ci.org/gated.svg\n   :target: https://dashboard.zuul.ansible.com/t/ansible/builds?project=ansible-community/molecule\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n   :target: https://github.com/python/black\n   :alt: Python Black Code Style\n\n.. image:: https://img.shields.io/badge/Code%20of%20Conduct-Ansible-silver.svg\n   :target: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html\n   :alt: Ansible Code of Conduct\n\n.. image:: https://img.shields.io/badge/Mailing%20lists-Ansible-orange.svg\n   :target: https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information\n   :alt: Ansible mailing lists\n\n.. image:: https://img.shields.io/badge/license-MIT-brightgreen.svg\n   :target: LICENSE\n   :alt: Repository License\n\nMolecule libvirt is designed to allow use of libvirt for provisioning test\nresources.\n\nPlease note that this driver is currently in its early stage of development,\ndo not even try to install or use it until this message is removed.\n\n.. _quickstart:\n\nQuickstart\n==========\n\nInstallation\n------------\n.. code-block:: bash\n\n   pip install molecule-libvirt\n\nCreate a scenario\n-----------------\n\nWith a new role\n^^^^^^^^^^^^^^^\n\n.. code-block:: bash\n\n   molecule init role -d libvirt my-role\n\nThis will create a new folder *my-role* containing a bare-bone generated\nrole like you would do with ``ansible-galaxy init`` command.\n\nIt will also contain a molecule folder with a default scenario\nusing the libvirt driver (using ansible community.libvirt collection).\n\nInstall the collection using:\n\n``ansible-galaxy install -r test_requirements.yml``.\n\nExample\n-------\nThis is a `molecule.yml` example file\n\n.. code-block:: yaml\n\n  dependency:\n  name: galaxy\n  driver:\n    name: libvirt\n  platforms:\n    - name: instance-1\n      cpu: 1\n      cpu_model: \"qemu64\"\n      image_url: \"https://download.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images/Fedora-Cloud-Base-34-1.2.x86_64.qcow2\"\n      disk_size: \"10G\"\n      ssh_port: 22\n      memory_size: \"1\" # in GB\n    - name: instance-2\n      memory: \"1\"\n      cpus: 1\n      image_url: \"https://download.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images/Fedora-Cloud-Base-34-1.2.x86_64.qcow2\"\n      libvirt_host: \"server.home.lan\"\n      libvirt_user: \"james\"\n      bridge_name: \"bridge0\"\n    - name: instance-3\n      memory: \"1\"\n      cpus: 1\n      image_url: \"https://download.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images/Fedora-Cloud-Base-34-1.2.x86_64.qcow2\"\n      libvirt_host: \"server.home.lan\"\n      libvirt_user: \"james\"\n      bridge_name: \"bridge0\"\n  provisioner:\n    name: ansible\n  verifier:\n    name: ansible\n\nOptional parameters\n-------------------\n\n``molecule_bridge``: existing bridge on local host. Can be useful if you\nwant to set network interface name created for molecule.\ndefault value is: **molecule-br0**.\n\n``molecule_network_cidr``: ip address range that should be bind to molecule\nvirtual network.\ndefault value is: **10.10.10.0/24**.\n\n``qemu_user``: qemu process user. On RHEL like system qemu user is **qemu**.\nOn Debian like, qemu user is **libvirt-qemu**.\ndefault value is: **qemu**.\n\n``cpu_model``: specifies CPU model requested by the guest virtual machine.\ndefault is : **qemu64**.\n\n``arch``: specifying the CPU architecture to virtualization. default is\n**x86_64**.\n\n``timezone``: vm's timezone. default is **America/Toronto**.\n\n``bridge_name``: existing bridge on remote host. This bridge should allow VM\nbeing reachable with an ip address.\n\n``libvirt_host`` and ``libvirt_user``: remote host parameters. **libvirt_user**\nshould belongs to *libvirt* group.\n\nOnce set, you will have to run:\n\n.. code-block:: bash\n\n   molecule test\n\n\nDocumentation\n=============\n\nRead the documentation and more at https://molecule.readthedocs.io/.\n\n.. _get-involved:\n\nGet Involved\n============\n\n* Join us in the ``#ansible-molecule`` channel on `Freenode`_.\n* Join the discussion in `molecule-users Forum`_.\n* Join the community working group by checking the `wiki`_.\n* Want to know about releases, subscribe to `ansible-announce list`_.\n* For the full list of Ansible email Lists, IRC channels see the\n  `communication page`_.\n\n.. _`Freenode`: https://freenode.net\n.. _`molecule-users Forum`: https://groups.google.com/forum/#!forum/molecule-users\n.. _`wiki`: https://github.com/ansible/community/wiki/Molecule\n.. _`ansible-announce list`: https://groups.google.com/group/ansible-announce\n.. _`communication page`: https://docs.ansible.com/ansible/latest/community/communication.html\n\n.. _authors:\n\nAuthors\n=======\n\n* James Regis\n* Gaëtan Trellu\n* Gariele Cerami\n* Sorin Sbarnea\n\n.. _license:\n\nLicense\n=======\n\nThe `MIT`_ License.\n\n.. _`MIT`: https://github.com/ansible/molecule/blob/master/LICENSE\n\nThe logo is licensed under the `Creative Commons NoDerivatives 4.0 License`_.\n\nIf you have some other use in mind, contact us.\n\n.. _`Creative Commons NoDerivatives 4.0 License`: https://creativecommons.org/licenses/by-nd/4.0/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansible-community%2Fmolecule-libvirt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansible-community%2Fmolecule-libvirt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansible-community%2Fmolecule-libvirt/lists"}