salt.modules.eselect

Support for eselect, Gentoo's configuration and management tool.

salt.modules.eselect.exec_action(module, action, module_parameter=None, action_parameter=None, state_only=False)

Execute an arbitrary action on a module.

module
name of the module to be executed
action
name of the module's action to be run
module_parameter
additional params passed to the defined module
action_parameter
additional params passed to the defined action
state_only
don't return any output but only the success/failure of the operation

CLI Example (updating the php implementation used for apache2):

salt '*' eselect.exec_action php update action_parameter='apache2'
salt.modules.eselect.get_current_target(module, module_parameter=None, action_parameter=None)

Get the currently selected target for the given module.

module
name of the module to be queried for its current target
module_parameter
additional params passed to the defined module
action_parameter
additional params passed to the 'show' action

CLI Example (current target of system-wide java-vm):

salt '*' eselect.get_current_target java-vm action_parameter='system'

CLI Example (current target of kernel symlink):

salt '*' eselect.get_current_target kernel
salt.modules.eselect.get_modules()

List available eselect modules.

CLI 范例:

salt '*' eselect.get_modules
salt.modules.eselect.get_target_list(module)

List available targets for the given module.

module
name of the module to be queried for its targets

CLI 范例:

salt '*' eselect.get_target_list kernel
salt.modules.eselect.set_target(module, target, module_parameter=None, action_parameter=None)

Set the target for the given module. Target can be specified by index or name.

module
name of the module for which a target should be set
target
name of the target to be set for this module
module_parameter
additional params passed to the defined module
action_parameter
additional params passed to the defined action

CLI Example (setting target of system-wide java-vm):

salt '*' eselect.set_target java-vm icedtea-bin-7 action_parameter='system'

CLI Example (setting target of kernel symlink):

salt '*' eselect.set_target kernel linux-3.17.5-gentoo