joestewart / robo-vagrant
Robo Task Runner 的 Vagrant 任务
1.3.1
2024-08-07 19:18 UTC
Requires
- php: >=5.5.0
- consolidation/robo: ^1.4.11 || ^2 || ^3 || ^4 || ^5
- symfony/event-dispatcher: ~2.5|~3.0|~4.0|~5.0|~6.0|~7.0
Requires (Dev)
- phpunit/phpunit: >=4.4
README
Robo Task Runner 的 Vagrant 任务
此包提供了以下 Vagrant 命令的 Robo 任务
box manages boxes: installation, removal, etc.
destroy stops and deletes all traces of the vagrant machine
global-status outputs status Vagrant environments for this user
halt stops the vagrant machine
help shows the help for a subcommand
init initializes a new Vagrant environment by creating a Vagrantfile
plugin manages plugins: install, uninstall, update, etc.
port displays information about guest port mappings
package packages a running vagrant environment into a box
provision provisions the vagrant machine
reload restarts vagrant machine, loads new Vagrantfile configuration
resume resume a suspended vagrant machine
ssh connects to machine via SSH
ssh-config outputs OpenSSH valid configuration to connect to the machine
status outputs status of the vagrant machine
suspend suspends the machine
up starts and provisions the vagrant environment
version prints current and latest Vagrant version
##安装
composer require joestewart/robo-vagrant
##使用
<?php
class RoboFile extends \Robo\Tasks
{
use \JoeStewart\Robo\Task\Vagrant\loadTasks;
...
?>
##示例
public function vagrantUp($arg = '')
{
$result = $this->taskVagrantUp()->arg($arg)->run();
return $result;
}
预定义命令
<?php
class RoboFile extends \Robo\Tasks
{
use \JoeStewart\Robo\Task\Vagrant\loadTasks;
use \JoeStewart\Robo\Task\Vagrant\Command\Vagrant;
...
?>
现在使用以下命令列出可用命令
./vendor/bin/robo list
##致谢
感谢 Robo.li、greg-1-anderson 和 boedah 提供的示例 Robo 代码。