summaryrefslogtreecommitdiff
path: root/devdocs/vagrant/cli%2Finit.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/vagrant/cli%2Finit.html
new repository
Diffstat (limited to 'devdocs/vagrant/cli%2Finit.html')
-rw-r--r--devdocs/vagrant/cli%2Finit.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/devdocs/vagrant/cli%2Finit.html b/devdocs/vagrant/cli%2Finit.html
new file mode 100644
index 00000000..0b074a05
--- /dev/null
+++ b/devdocs/vagrant/cli%2Finit.html
@@ -0,0 +1,20 @@
+<h1 id="init"> Init </h1> <p><strong>Command: <code>vagrant init [name [url]]</code></strong></p> <p>This initializes the current directory to be a Vagrant environment by creating an initial <a href="../vagrantfile/index">Vagrantfile</a> if one does not already exist.</p> <p>If a first argument is given, it will prepopulate the <code>config.vm.box</code> setting in the created Vagrantfile.</p> <p>If a second argument is given, it will prepopulate the <code>config.vm.box_url</code> setting in the created Vagrantfile.</p> <h2 id="options"> Options </h2> <ul> <li>
+<p><a href="#box-version"><code>--box-version</code></a> - (Optional) The box version or box version constraint to add to the <code>Vagrantfile</code>.</p> </li> <li>
+<p><a href="#force"><code>--force</code></a> - If specified, this command will overwrite any existing <code>Vagrantfile</code>.</p> </li> <li>
+<p><a href="#minimal"><code>--minimal</code></a> - If specified, a minimal Vagrantfile will be created. This Vagrantfile does not contain the instructional comments that the normal Vagrantfile contains.</p> </li> <li>
+<p><a href="#output-file"><code>--output FILE</code></a> - This will output the Vagrantfile to the given file. If this is "-", the Vagrantfile will be sent to stdout.</p> </li> <li>
+<p><a href="#template-file"><code>--template FILE</code></a> - Provide a custom ERB template for generating the Vagrantfile.</p> </li> </ul> <h2 id="examples"> Examples </h2> <p>Create a base Vagrantfile:</p> <div class="highlight"><pre class="highlight shell" data-language="shell">$ vagrant init hashicorp/precise64
+</pre></div>
+<p>Create a minimal Vagrantfile (no comments or helpers):</p> <div class="highlight"><pre class="highlight shell" data-language="shell">$ vagrant init -m hashicorp/precise64
+</pre></div>
+<p>Create a new Vagrantfile, overwriting the one at the current path:</p> <div class="highlight"><pre class="highlight shell" data-language="shell">$ vagrant init -f hashicorp/precise64
+</pre></div>
+<p>Create a Vagrantfile with the specific box, from the specific box URL:</p> <div class="highlight"><pre class="highlight shell" data-language="shell">$ vagrant init my-company-box https://boxes.company.com/my-company.box
+</pre></div>
+<p>Create a Vagrantfile, locking the box to a version constraint:</p> <div class="highlight"><pre class="highlight shell" data-language="shell">$ vagrant init --box-version '&gt; 0.1.5' hashicorp/precise64
+</pre></div><div class="_attribution">
+ <p class="_attribution-p">
+ &copy; 2010&ndash;2018 Mitchell Hashimoto<br>Licensed under the MPL 2.0 License.<br>
+ <a href="https://www.vagrantup.com/docs/cli/init.html" class="_attribution-link">https://www.vagrantup.com/docs/cli/init.html</a>
+ </p>
+</div>