A tool to generate Vagrant init files with custom configurations
Project description
Vagrant Init Generator
Overview
vagrant-init-generator is a command-line tool that simplifies the process of generating Vagrant Vagrantfile with custom configurations. It allows users to specify CPU, RAM, machine name, host name, IP address, forwarded ports, and provisioning commands easily through user-friendly prompts or default values.
Features
- Generate
Vagrantfilewith custom configurations - Interactive prompts for user input (CPU, RAM, machine name, host name, IP address, forwarded ports, provision commands)
- Support for specifying forwarded ports and provisioning commands
- Default values for skipped prompts
- Easy installation and usage
Installation
To install vagrant-creator, you can use pip:
pip install vagrant-creator
Usage
To generate a vagrant file, Run vagrant-creator to start the interactive setup and follow the steps as prompted to customize the file as required:
vagrant-creator
Entering Information
- Pressing `Enter` will use the default value shown in parentheses.
- To add multiple forwarded ports or provisioning commands, follow the prompts.
Forwarded Ports
When prompted to add a forwarded port, enter y to add a port or n to skip.
- Guest Port: Enter the guest port number (default: 8080).
- Host Port: Enter the host port number (default: 8080).
- Auto Correct: Enable auto-correct (default: true). Enter
tfor true orffor false.
Provisioning Commands
When prompted to add a provisioning command, enter y to add a command or n to skip.
- Command: Enter the provisioning command (e.g.,
sudo yum install ansible -y).
Example
Here's an example of the interactive setup:
$ vagrant-creator
===================================== Vagrant file generator =====================================
Enter vm box name (default: centos/7):
Enter CPU (default: 1):
Enter RAM in MB (default: 1024):
Enter Machine Name (default: default-machine):
Enter Host Name (default: localhost):
Enter IP Address (default: 192.168.33.10):
Do you want to add a forwarded port? [y (Yes) /n (No)]: y
Enter the guest port number (default: 8080):
Enter the host port number (default: 8080):
Enable auto correct? (default: true) [t (True) /f (False)]: t
Do you want to add a provisioning command? [y (Yes) /n (No)]: y
Enter the provisioning command (e.g., 'sudo yum install ansible -y'): sudo apt-get install ansible -y
Do you want to add a provisioning command? [y (Yes) /n (No)]: n
Vagrantfile generated successfully!
License
This project is licensed under the MIT License. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vagrant-creator-0.0.6.tar.gz.
File metadata
- Download URL: vagrant-creator-0.0.6.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3026f3b416d750113570c8095f376868473a2a14e437a99cb3baead480542777
|
|
| MD5 |
043637514f13254722c8e49fbf5c0646
|
|
| BLAKE2b-256 |
89866f171f7ef3327683a937c640c5fa37bf732c4e9a12fbd9f5b3f13afff8ed
|
File details
Details for the file vagrant_creator-0.0.6-py3-none-any.whl.
File metadata
- Download URL: vagrant_creator-0.0.6-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
015fe17037b6d244b149fc0eb401ae663a0622d05b6b6ef853fbd66312080cd0
|
|
| MD5 |
158b03d8cd8d5eb9e53c8d12dbdd5783
|
|
| BLAKE2b-256 |
f3e91a10996844f3e977e4da2429ddf56f320ecc89ce259c1ea1869aeed32aaa
|