laravel / envoy

Elegant SSH tasks for PHP.

Home Page:https://laravel.com/docs/envoy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple host patterns

aleksandrpnshkn opened this issue · comments

  • Envoy Version: 2.7.0
  • Laravel Version: 8.64.0
  • PHP Version: 8.0.11

Description:

I have multiple projects on a server. It is convenient to me to use multipattern feature in ssh config like:

Host project1.stage project2.stage
	HostName IP_ADDRESS
	...

From the ssh_config(5) man page:

Host   ... 
       If more than one pattern is provided, they should be separated by whitespace.
       ...

But envoy fails with this config:

$ vendor/bin/envoy run pwd
[project1.stage project2.stage]:  bash: project2.stage: command not found
[✗] This task did not complete successfully on one of your servers.

Steps To Reproduce:

Configure .ssh/config

Host project1.stage project2.stage
        HostName IP_ADDRESS
        User USERNAME

Create project

laravel new envoy-multiple-hosts
cd envoy-multiple-hosts
composer require laravel/envoy --dev

Create task

nano Envoy.blade.php
@servers(['web' => ['USERNAME@IP_ADDRESS']])

@task('pwd', ['on' => 'web'])
    pwd
@endtask

Run task

vendor/bin/envoy run pwd

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.