Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f2fc656

Browse files
committed
Add some docs on targetting groups of machines
1 parent 5fa007f commit f2fc656

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ And execute against an environment and set of hosts like so:
3737
$ fab preview class:frontend do:'uname -a'
3838
...
3939

40+
### Targetting groups of machines
41+
42+
Fabric tasks can be run on groups of machines in a variety of different ways.
43+
44+
by puppet class
45+
46+
# target all machines that have the 'govuk::safe_to_reboot::yes' class
47+
$ fab preview puppet_class:govuk::safe_to_reboot::yes do:'uname -a'
48+
49+
by numeric machine suffix
50+
51+
# target all machines that end in '2'
52+
$ fab preview numbered:2 do:'uname -a'
53+
4054
## Remote usage (legacy)
4155

4256
It was previously possible to use these scripts from the jumpboxes via the

0 commit comments

Comments
 (0)