molecule-vagrant


Namemolecule-vagrant JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/ansible-community/molecule-vagrant
SummaryVagrant Molecule Plugin :: run molecule tests using Vagrant
upload_time2023-01-06 21:46:40
maintainerSorin Sbarnea
docs_urlNone
authorSorin Sbarnea
requires_python>=3.9
licenseMIT
keywords ansible roles testing molecule plugin vagrant
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ***********************
Molecule Vagrant Plugin
***********************

.. image:: https://badge.fury.io/py/molecule-vagrant.svg
   :target: https://badge.fury.io/py/molecule-vagrant
   :alt: PyPI Package

.. image:: https://zuul-ci.org/gated.svg
   :target: https://dashboard.zuul.ansible.com/t/ansible/builds?project=ansible-community/molecule-vagrant

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/python/black
   :alt: Python Black Code Style

.. image:: https://img.shields.io/badge/Code%20of%20Conduct-silver.svg
   :target: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
   :alt: Ansible Code of Conduct

.. image:: https://img.shields.io/badge/Mailing%20lists-silver.svg
   :target: https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information
   :alt: Ansible mailing lists

.. image:: https://img.shields.io/badge/license-MIT-brightgreen.svg
   :target: LICENSE
   :alt: Repository License

Molecule Vagrant is designed to allow use of Vagrant for provisioning of test
resources.

Supported Platforms
===================

This driver relies on vagrant command line which is known to be problematic
to install on several platforms. We do our best to perform CI/CD testing on
multiple platforms but some are disabled due to known bugs.

* ✅ MacOS with VirtualBox - GitHub Actions
* ✅ Fedora 32 with libvirt - Zuul
* ✅ Ubuntu Bionic (18.04) with libvirt - Zuul
* ❌ CentOS 8 with libvirt - Zuul DISABLED due to 1127_ and 11020_

Please **do not file bugs for unsupported platforms**. You are welcomed to
create PRs that fix untested platform, as long they do not break existing ones.

.. _`1127`: https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1127
.. _`11020`: https://github.com/hashicorp/vagrant/issues/11020


Documentation
=============

To use this plugin, you'll need to set the ``driver`` and ``platform``
variables in your ``molecule.yml``. Here's a simple example using the
`fedora/32-cloud-base`_ box:

.. code-block:: yaml

   driver:
     name: vagrant

   platforms:
     - name: instance
       box: fedora/32-cloud-base
       memory: 512
       cpus: 1

Here's a full example with the libvirt provider:

.. code-block:: yaml

   driver:
     name: vagrant
     provider:
       # Can be any supported provider (virtualbox, parallels, libvirt, etc)
       # Defaults to virtualbox
       name: libvirt
     # Run vagrant up with --provision.
     # Defaults to --no-provision)
     provision: no
     # vagrant-cachier configuration
     # Defaults to 'machine'
     # Any value different from 'machine' or 'box' will disable it
     cachier: machine
     # If set to false, set VAGRANT_NO_PARALLEL to '1'
     # Defaults to true
     parallel: true
     # vagrant box to use by default
     # Defaults to 'generic/alpine316'
     default_box: 'generic/alpine316'

   platforms:
     - name: instance
       # If specified, set host name to hostname, unless it's set to False and
       # the host name won't be set. In all other cases (including default) use
       # 'name' as host name.
       hostname: foo.bar.com
       # List of dictionaries mapped to `config.vm.network`
       interfaces:
         # `network_name` is the required identifier, all other keys map to
         # arguments.
         - auto_config: true
           network_name: private_network
           type: dhcp
         - network_name: private_network
           ip: 192.168.123.3
         - network_name: forwarded_port
           guest: 80
           host: 8080
       # List of raw Vagrant `config` options
       instance_raw_config_args:
         # use single quotes to avoid YAML parsing as dict due to ':'
         - 'vm.synced_folder ".", "/vagrant", type: "rsync"'
         # Run 'uname' a provisionning step **needs 'provision: true' to work**
         - 'vm.provision :shell, inline: "uname"'
       # Dictionary of `config` options. Note that string values need to be
       # explicitly enclosed in quotes.
       config_options:
         ssh.keep_alive: yes
         ssh.remote_user: 'vagrant'
         synced_folder: true
       box: fedora/32-cloud-base
       box_version: 32.20200422.0
       box_url:
       memory: 512
       cpus: 1
       # Dictionary of options passed to the provider
       provider_options:
         video_type: 'vga'
       # List of raw provider options
       provider_raw_config_args:
         - cpuset = '1-4,^3,6'

.. _`fedora/32-cloud-base`: https://app.vagrantup.com/fedora/boxes/32-cloud-base


More examples may be found in the ``molecule`` `scenarios directory`_.
They're the scenarios used by the CI.


.. _get-involved:

Get Involved
============

* Join us in the ``#ansible-devtools`` channel on `Libera`_.
* Join the discussion in `molecule-users Forum`_.
* Join the community working group by checking the `wiki`_.
* Want to know about releases, subscribe to `ansible-announce list`_.
* For the full list of Ansible email Lists, IRC channels see the
  `communication page`_.

.. _`Libera`: https://web.libera.chat/?channel=#ansible-devtools
.. _`molecule-users Forum`: https://groups.google.com/forum/#!forum/molecule-users
.. _`wiki`: https://github.com/ansible/community/wiki/Molecule
.. _`ansible-announce list`: https://groups.google.com/group/ansible-announce
.. _`communication page`: https://docs.ansible.com/ansible/latest/community/communication.html
.. _`scenarios directory`: https://github.com/ansible-community/molecule-vagrant/tree/main/molecule_vagrant/test/scenarios/molecule
.. _authors:

Authors
=======

Molecule Vagrant Plugin was created by Sorin Sbarnea based on code from
Molecule.

.. _license:

License
=======

The `MIT`_ License.

.. _`MIT`: https://github.com/ansible-community/molecule-vagrant/blob/main/LICENSE

The logo is licensed under the `Creative Commons NoDerivatives 4.0 License`_.

If you have some other use in mind, contact us.

.. _`Creative Commons NoDerivatives 4.0 License`: https://creativecommons.org/licenses/by-nd/4.0/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ansible-community/molecule-vagrant",
    "name": "molecule-vagrant",
    "maintainer": "Sorin Sbarnea",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "sorin.sbarnea@gmail.com",
    "keywords": "ansible,roles,testing,molecule,plugin,vagrant",
    "author": "Sorin Sbarnea",
    "author_email": "sorin.sbarnea@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c9/ad/0ed60a69cd6887622ff03d67beacbc54183f9d6fa45978c37dc35a315b30/molecule-vagrant-2.0.0.tar.gz",
    "platform": null,
    "description": "***********************\nMolecule Vagrant Plugin\n***********************\n\n.. image:: https://badge.fury.io/py/molecule-vagrant.svg\n   :target: https://badge.fury.io/py/molecule-vagrant\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-vagrant\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-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-silver.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 Vagrant is designed to allow use of Vagrant for provisioning of test\nresources.\n\nSupported Platforms\n===================\n\nThis driver relies on vagrant command line which is known to be problematic\nto install on several platforms. We do our best to perform CI/CD testing on\nmultiple platforms but some are disabled due to known bugs.\n\n* \u2705 MacOS with VirtualBox - GitHub Actions\n* \u2705 Fedora 32 with libvirt - Zuul\n* \u2705 Ubuntu Bionic (18.04) with libvirt - Zuul\n* \u274c CentOS 8 with libvirt - Zuul DISABLED due to 1127_ and 11020_\n\nPlease **do not file bugs for unsupported platforms**. You are welcomed to\ncreate PRs that fix untested platform, as long they do not break existing ones.\n\n.. _`1127`: https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1127\n.. _`11020`: https://github.com/hashicorp/vagrant/issues/11020\n\n\nDocumentation\n=============\n\nTo use this plugin, you'll need to set the ``driver`` and ``platform``\nvariables in your ``molecule.yml``. Here's a simple example using the\n`fedora/32-cloud-base`_ box:\n\n.. code-block:: yaml\n\n   driver:\n     name: vagrant\n\n   platforms:\n     - name: instance\n       box: fedora/32-cloud-base\n       memory: 512\n       cpus: 1\n\nHere's a full example with the libvirt provider:\n\n.. code-block:: yaml\n\n   driver:\n     name: vagrant\n     provider:\n       # Can be any supported provider (virtualbox, parallels, libvirt, etc)\n       # Defaults to virtualbox\n       name: libvirt\n     # Run vagrant up with --provision.\n     # Defaults to --no-provision)\n     provision: no\n     # vagrant-cachier configuration\n     # Defaults to 'machine'\n     # Any value different from 'machine' or 'box' will disable it\n     cachier: machine\n     # If set to false, set VAGRANT_NO_PARALLEL to '1'\n     # Defaults to true\n     parallel: true\n     # vagrant box to use by default\n     # Defaults to 'generic/alpine316'\n     default_box: 'generic/alpine316'\n\n   platforms:\n     - name: instance\n       # If specified, set host name to hostname, unless it's set to False and\n       # the host name won't be set. In all other cases (including default) use\n       # 'name' as host name.\n       hostname: foo.bar.com\n       # List of dictionaries mapped to `config.vm.network`\n       interfaces:\n         # `network_name` is the required identifier, all other keys map to\n         # arguments.\n         - auto_config: true\n           network_name: private_network\n           type: dhcp\n         - network_name: private_network\n           ip: 192.168.123.3\n         - network_name: forwarded_port\n           guest: 80\n           host: 8080\n       # List of raw Vagrant `config` options\n       instance_raw_config_args:\n         # use single quotes to avoid YAML parsing as dict due to ':'\n         - 'vm.synced_folder \".\", \"/vagrant\", type: \"rsync\"'\n         # Run 'uname' a provisionning step **needs 'provision: true' to work**\n         - 'vm.provision :shell, inline: \"uname\"'\n       # Dictionary of `config` options. Note that string values need to be\n       # explicitly enclosed in quotes.\n       config_options:\n         ssh.keep_alive: yes\n         ssh.remote_user: 'vagrant'\n         synced_folder: true\n       box: fedora/32-cloud-base\n       box_version: 32.20200422.0\n       box_url:\n       memory: 512\n       cpus: 1\n       # Dictionary of options passed to the provider\n       provider_options:\n         video_type: 'vga'\n       # List of raw provider options\n       provider_raw_config_args:\n         - cpuset = '1-4,^3,6'\n\n.. _`fedora/32-cloud-base`: https://app.vagrantup.com/fedora/boxes/32-cloud-base\n\n\nMore examples may be found in the ``molecule`` `scenarios directory`_.\nThey're the scenarios used by the CI.\n\n\n.. _get-involved:\n\nGet Involved\n============\n\n* Join us in the ``#ansible-devtools`` channel on `Libera`_.\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.. _`Libera`: https://web.libera.chat/?channel=#ansible-devtools\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.. _`scenarios directory`: https://github.com/ansible-community/molecule-vagrant/tree/main/molecule_vagrant/test/scenarios/molecule\n.. _authors:\n\nAuthors\n=======\n\nMolecule Vagrant Plugin was created by Sorin Sbarnea based on code from\nMolecule.\n\n.. _license:\n\nLicense\n=======\n\nThe `MIT`_ License.\n\n.. _`MIT`: https://github.com/ansible-community/molecule-vagrant/blob/main/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",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Vagrant Molecule Plugin :: run molecule tests using Vagrant",
    "version": "2.0.0",
    "split_keywords": [
        "ansible",
        "roles",
        "testing",
        "molecule",
        "plugin",
        "vagrant"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8cfaadbb39abc85ec56ab997ff0e39fbc20df9653d6f3a76da5a9e2689cc43b0",
                "md5": "ae1c0c5613b8ae0b72f68a73325c5c5a",
                "sha256": "2fdd67228cd2926e07d6702e5534480f0ea1319ad1e1eaad0038240a1420039c"
            },
            "downloads": -1,
            "filename": "molecule_vagrant-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ae1c0c5613b8ae0b72f68a73325c5c5a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 33521,
            "upload_time": "2023-01-06T21:46:38",
            "upload_time_iso_8601": "2023-01-06T21:46:38.951696Z",
            "url": "https://files.pythonhosted.org/packages/8c/fa/adbb39abc85ec56ab997ff0e39fbc20df9653d6f3a76da5a9e2689cc43b0/molecule_vagrant-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c9ad0ed60a69cd6887622ff03d67beacbc54183f9d6fa45978c37dc35a315b30",
                "md5": "c90203ccab2a3561f331b2e97406d5e7",
                "sha256": "bb27f4ec482d0f68231f31136bfba328fc8ef7d81341874284bdd71295e278d5"
            },
            "downloads": -1,
            "filename": "molecule-vagrant-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c90203ccab2a3561f331b2e97406d5e7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 31901,
            "upload_time": "2023-01-06T21:46:40",
            "upload_time_iso_8601": "2023-01-06T21:46:40.360547Z",
            "url": "https://files.pythonhosted.org/packages/c9/ad/0ed60a69cd6887622ff03d67beacbc54183f9d6fa45978c37dc35a315b30/molecule-vagrant-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-06 21:46:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "ansible-community",
    "github_project": "molecule-vagrant",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "molecule-vagrant"
}
        
Elapsed time: 0.17088s