Skip to content

Commit a7cd184

Browse files
shellydaviddmmqzivanbalutasebastiaanspeckacuteenvy
authored
vagrant-{init, ssh-config}: add page (#19750)
Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com> Co-authored-by: Ivan Baluta <50071699+ivanbaluta@users.noreply.github.com> Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Co-authored-by: Lena Pastwa <lena@lnps.me>
1 parent a9a3a07 commit a7cd184

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

pages/common/vagrant-init.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# vagrant init
2+
3+
> Initialize a Vagrant environment in the current directory by creating a `Vagrantfile`.
4+
> See also: `vagrant`.
5+
> More information: <https://developer.hashicorp.com/vagrant/docs/cli/init>.
6+
7+
- Create a `Vagrantfile`:
8+
9+
`vagrant init`
10+
11+
- Create a `Vagrantfile` without instructional comments:
12+
13+
`vagrant init {{[-m|--minimal]}}`
14+
15+
- Specify the box name and URL:
16+
17+
`vagrant init {{box_name}} {{box_url}}`
18+
19+
- Create a `Vagrantfile` with a specific box version:
20+
21+
`vagrant init --box-version {{version}} {{box_name}}`
22+
23+
- Send the `Vagrantfile` to `stdout`:
24+
25+
`vagrant init {{[-o|--output]}} -`
26+
27+
- Overwrite an existing `Vagrantfile`:
28+
29+
`vagrant init {{[-f|--force]}}`
30+
31+
- Provide a custom ERB template for generating the `Vagrantfile`:
32+
33+
`vagrant init --template {{path/to/file.erb}}`

pages/common/vagrant-ssh-config.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# vagrant ssh-config
2+
3+
> Display configuration to SSH into a Vagrant machine manually (instead of using `vagrant ssh`).
4+
> See also: `vagrant`.
5+
> More information: <https://developer.hashicorp.com/vagrant/docs/cli/ssh_config>.
6+
7+
- Get SSH configuration for the machine running in the current directory:
8+
9+
`vagrant ssh-config`
10+
11+
- Target a machine by name or ID:
12+
13+
`vagrant ssh-config {{name|id}}`

0 commit comments

Comments
 (0)