CentOS 5
Sponsored Link

Operation2010/05/03

  Basic usage of func command is like below.

func target call module method [args ...]
[1] Show minons
# show list of minions

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

minion.server-linux.info
www.server-linux.info

# show minions that has 'www' at the head of a name

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

www.server-linux.info

# specify minions and show them

[root@certmaster ~]#
func "minion.server-linux.info;www.server-linux.info" list_minions

minion.server-linux.info
www.server-linux.info
[2] Show all modules to be able to use
# Show all modules to be able to use on www.server-linux.info

[root@certmaster ~]#
func "www.server-linux.info" call system list_modules

{'www.server-linux.info': ['bridge',
'certmastermod',

'command',

'copyfile',

'delegation',

'djangoctl',

'echo',

'filetracker',

'func_getargs',

'func_module',

'hardware',

'iptables',

'iptables.port',

'jboss',

'jobs',

'meta',

'mount',

'nagios-check',

'netapp.options',

'netapp.snap',

'netapp.vol',

'netapp.vol.clone',

'networktest',

'overlord',

'process',

'reboot',

'rpms',

'service',

'smart',

'snmp',

'sysctl',

'test',

'vlan',

'yumcmd']}

[3] Show all methods in a module
# show all methods in 'command' module

[root@certmaster ~]#
func "www.server-linux.info" call command list_methods

{'www.server-linux.info': ['save_config',
'run',

'exists',

'module_description',

'module_version',

'get_method_args',

'module_api_version',

'list_methods']}

Matched Content