File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -87,3 +87,39 @@ Host *
8787| ` setLabels ` | Key-value pairs for host selector. |
8888| ` setSshArguments ` | For example, ` ['-o UserKnownHostsFile=/dev/null'] ` |
8989
90+ ## Multiple hosts
91+
92+ You can pass multiple hosts to the host function:
93+
94+ ``` php
95+ host('example.org', 'deployer.org', ...)
96+ ->setRemoteUser('anton');
97+ ```
98+
99+ ## Host ranges
100+
101+ If you have a lot of hosts following similar patterns, you can describe them
102+ like this rather than listing each hostname:
103+
104+ ``` php
105+ host('www[01:50].example.org');
106+ ```
107+
108+ For numeric patterns, leading zeros can be included or removed, as desired.
109+ Ranges are inclusive.
110+
111+ You can also define alphabetic ranges:
112+
113+ ``` php
114+ host('db[a:f].example.org');
115+ ```
116+
117+ ## Localhost
118+
119+ A special function [ localhost()] ( api.md#localhost ) defines a special local host.
120+ Deployer will not connect to this host and will execute commands locally.
121+
122+ ``` php
123+ localhost(); // Alias and hostname will be "localhost".
124+ localhost('ci'); // Alias is "ci", hostname is "localhost".
125+ ```
You can’t perform that action at this time.
0 commit comments