Transactional executor module
New in version 3004.
Delegate into transactional_update module
The transactional_update
module support the execution of
functions inside a transaction, as support apply a state (via
apply
, sls
, single
or highstate
).
This execution module can be used to route some Salt modules and functions to be executed inside the transaction snapshot.
Add this executor in the minion configuration file:
module_executors:
- transactional_update
- direct_call
Or use the command line parameter:
salt-call --module-executors='[transactional_update, direct_call]' test.version
You can also schedule a reboot if needed:
salt-call --module-executors='[transactional_update]' state.sls stuff activate_transaction=True
There are some configuration parameters supported:
# Replace the list of default modules that all the functions
# are delegated to `transactional_update.call()`
delegated_modules: [cmd, pkg]
# Replace the list of default functions that are delegated to
# `transactional_update.call()`
delegated_functions: [pip.install]
# Expand the default list of modules
add_delegated_modules: [ansible]
# Expand the default list of functions
add_delegated_functions: [file.copy]