CentOS 6
Sponsored Link

Func - How to use
2011/07/15
 
Basic usage of func command is like follows.
⇒ func target call module method [args ...]
[1] Show minons
# show all minions

[root@certmaster ~]#
func "*" list_minions

minion01
minion02
# show specific minions

[root@certmaster ~]#
func "minion01;minion02" list_minions

minion01
minion02
[2] Show all modules
# show modules on minion01

[root@certmaster ~]#
func "minion01" call system list_modules
{'minion01': ['bridge', 'certmastermod', 'command', 'confmgt_augeas', 'copyfile', 'cpu', 'delegation', 'disk', 'djangoctl', 'echo', 'fact', 'filetracker', 'func_getargs', 'func_module', 'getfile', 'hardware', 'httpd', 'iptables', 'iptables.port', 'jboss', 'jobs', 'mount', 'nagios-check', 'netapp.options', 'netapp.snap', 'netapp.vol', 'netapp.vol.clone', 'networktest', 'overlord', 'process', 'pullfile', 'reboot', 'rpms', 'service', 'smart', 'snmp', 'sysctl', 'test', 'users', 'vlan', 'yumcmd']}
[3] Show methods for a module
# show methods for "command" module

[root@certmaster ~]#
func "minion01" call command list_methods
{'minion01': ['run', 'config_items', 'grep', 'exists', 'save_config', 'module_version', 'grep', 'list_methods', 'module_description', 'get_method_args', 'module_api_version']}
Matched Content
 
Tweet