Diferències
Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.
| Ambdós costats versió prèvia Revisió prèvia Següent revisió | Revisió prèvia | ||
| tech:vagrant:vagrantfile [14/02/2022 09:44] – mate | tech:vagrant:vagrantfile [14/02/2022 10:45] (actual) – creat mate | ||
|---|---|---|---|
| Línia 1: | Línia 1: | ||
| - | = vagrantfile | + | = vagrantfile |
| - | {{NEWPAGE> | + | * provisioning: [[https:// |
| + | == Vagrant.configure(" | ||
| + | * config namespace: [[https:// | ||
| + | === box | ||
| + | * box a usar: **config.vm.box** | ||
| + | * config.vm.box=" | ||
| + | * versión de la box a usar: **config.vm.box_version** | ||
| + | * config.vm.box_version=" | ||
| + | * dirección URL de la box: **config.vm.box_url** | ||
| + | * config.vm.box_url=" | ||
| - | {{topic> | + | === hostname |
| + | === provision | ||
| + | * **name**: nombre del provisionar (para info) | ||
| + | * **type**: | ||
| + | * shell | ||
| + | * file | ||
| + | * **after**: (experimental) | ||
| + | * [[https:// | ||
| + | * all | ||
| + | * each | ||
| + | * **before**: (experimental) | ||
| + | * [[https:// | ||
| + | * all | ||
| + | * each | ||
| + | * communicator_required | ||
| + | * run | ||
| + | * always | ||
| + | * never | ||
| + | * once | ||
| - | == vagrant box | + | |
| - | | + | |
| - | - '' | + | * < |
| - | - subir (versión, proveedor, etc...) | + | |
| - | - descargar (desde otro Vagrantfile):< | + | end</code> |
| - | + | | |
| - | == ejemplos | + | |
| - | + | ||
| - | + | ||
| - | === configuraciones simples | + | |
| - | <sxh ruby; title: 1 máquina, varias opciones de configuración> | + | |
| - | Vagrant.configure(2) do |config| | + | |
| - | config.vm.box = " | + | |
| - | config.vm.hostname = " | + | |
| - | | + | |
| - | + | ||
| - | | + | |
| - | config.vm.network : | + | |
| - | config.vm.network : | + | |
| - | | + | |
| - | config.vm.synced_folder | + | |
| - | + | ||
| - | config.vm.provider | + | |
| - | | + | |
| - | vb.memory = 1024 | + | |
| - | vb.cpus = 3 | + | |
| - | vb.linked_clone = true | + | |
| - | vb.gui = true | + | |
| - | end | + | |
| - | end | + | |
| - | </sxh> | + | |
| - | + | ||
| - | <sxh ruby; title: 2 máquinas> | + | |
| - | Vagrant.configure(" | + | |
| - | config.vm.define " | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | end | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | end | + | |
| - | end | + | |
| - | </sxh> | + | |
| + | === network | ||
| + | === sync_folder | ||
| + | === provider | ||
| + | === define | ||