%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/states/ |
Current File : //lib/python2.7/site-packages/salt/states/vagrant.pyo |
� ���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l m Z m Z d d l j j Z d Z d � Z d d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d S( u� Manage Vagrant VMs ================== Manange execution of Vagrant virtual machines on Salt minions. Vagrant_ is a tool for building and managing virtual machine environments. It can use various providers, such as VirtualBox_, Docker_, or VMware_, to run its VMs. Vagrant provides some of the functionality of a light-weight hypervisor. The combination of Salt modules, Vagrant running on the host, and a virtual machine provider, gives hypervisor-like functionality for developers who use Vagrant to quickly define their virtual environments. .. _Vagrant: http://www.vagrantup.com/ .. _VirtualBox: https://www.virtualbox.org/ .. _Docker: https://www.docker.io/ .. _VMWare: https://www.vmware.com/ .. versionadded:: 2018.3.0 The configuration of each virtual machine is defined in a file named ``Vagrantfile`` which must exist on the VM host machine. The essential parameters which must be defined to start a Vagrant VM are the directory where the ``Vagrantfile`` is located \(argument ``cwd:``\), and the username which will own the ``Vagrant box`` created for the VM \( argument ``vagrant_runas:``\). A single ``Vagrantfile`` may define one or more virtual machines. Use the ``machine`` argument to chose among them. The default (blank) value will select the ``primary`` (or only) machine in the Vagrantfile. \[NOTE:\] Each virtual machine host must have the following: - a working salt-minion - a Salt sdb database configured for ``vagrant_sdb_data``. - Vagrant installed and the ``vagrant`` command working - a suitable VM provider .. code-block:: yaml # EXAMPLE: # file /etc/salt/minion.d/vagrant_sdb.conf on the host computer # -- this sdb database is required by the Vagrant module -- vagrant_sdb_data: # The sdb database must have this name. driver: sqlite3 # Let's use SQLite to store the data ... database: /var/cache/salt/vagrant.sqlite # ... in this file ... table: sdb # ... using this table name. create_table: True # if not present i ( t absolute_importt print_functiont unicode_literalsN( t CommandExecutionErrort SaltInvocationErroru vagrantc C@ s d t k r t St S( u<