Command Line Examples
The command line is the most basic way to interact with your Func minions. You can control many of them all at once, or perhaps you just want to control a specific machine.
The command line is "func" and the first parameter is always the name (or names, see Globbing) of the machines you want to target. The following parameter is a method name, and then the parameters are listed.
First off, let's see what a remote func minion is capable of:
func machine.example.org call system list_modules
So, we've just obtained a list of all the remote modules we can use. So, given a list of modules, how do we see the functions in that module? Simple.
func machine.example.org call hardware list_methods
Once you have a particular method you want to run in mind, it's invoked in the same way.
func target.example.org call service restart httpd
The "func" command line tool is always run on the master server.
As noted in Globbing, you're not limited to running one command at a time. For instance, it's possible to apply commands to ALL of your systems, in one pass. See the linked globbing entry for more details on what you can do.
func "*" call service restart httpd
