func (1) - Linux Man Pages
func: Fedora Unified Network Controller.
NAMEFunc -- Fedora Unified Network Controller.
SYNOPSISfunc ``*'' list_minions
func target.example.org call module method [args ...]
func ``target*.example.org'' call module method [args ...]
DESCRIPTION``func'' allows remote control of machines running funcd (called ``minions'') that are set to obey this machine (called the ``overlord''). This includes performing various remote operations and gathering data.
``func'' can address multiple machines at the same time by specifying their names with globs, which follow shell glob syntax.
Groups of machines can also be specified in /etc/func/groups. To invoke func on a group of machines specifying ``@groupname''.
THE CALL MODULEThe ``call'' module is used for running func modules remotely.
LISTING REMOTE MODULES AVAILABLEIt's possible to ask func minions what modules they have installed:
LISTING REMOTE FUNCTIONS AVAILABLE IN A MODULEIt is also possible to ask remote func modules what functions they support:
CALLING A REMOTE COMMANDOnce you have the name of a module you want to run, use call to invoke it:
OUTPUT FORMATSThe ``call'' command by default outputs data using a ``pretty printer''. Other display options include --raw, --json, and --xmlrpc, which may be more desirable if you are running func inside another script or prefer to read those display formats.
HELPER MODULESIn addition to ``call'', there are other modules that make control of remote machines, as well as data display, more user friendly. They augment ``call'' by providing some additional functionality.
You will notice that the syntax for using one of these helper modules varies slightly from just using ``call'' directly.
For example ``show'' can be used to show remote data. The normal command "func '*' command would dump a very large amount of data, while the show command can mine only a few details. This might make things more readable, for instance, when not going through the Python API (where you would not care).
func ``*.example.org'' show hardware --help
func ``*.example.org'' show hardware systemMemory
func ``*.example.org'' show hardware os
Another useful helper command module is copyfile, which allows func to work like scp from the shell, though it can address multiple systems at the same time.
The following example pushes one file out to multiple systems:
func ``*.example.org'' copyfile --file=/tmp/foo --remotepath=/tmp/foo
--verboseUse this flag to output extra information from func while it is running. All func commands can take this flag.
EXIT_STATUSFunc commands have return values that vary based on the module being called. See the project page (linked below) for more information.
ADDITONAL RESOURCESSee https://fedorahosted.org/func/ for more information, including information on scripting func from Python.
AUTHORVarious. See https://fedorahosted.org/func/