mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
9942ea9319
* Ensure rh_service not used on CloudLinux 7 Add CloudLinux to RHEL-derived distros excluded from rh_service use in osrelease >= 7 * Fix binary search and replace (#32542) * Don't return None from eval_master (#32555) Raise an exception instead. Because eval master if returns should return a tuple. * redact passwords and hashes from user.present updates Fixes #32381 * Better log message on minion restart if master couldn't be reached. (#32576) * Revert PR #32480 and apply #32314 with fixes / documentation (#32558) * Revert "Fix loop in maint.flo" This reverts commit 5196cd6a6e5db3c7b1a47b1740881bbd3e87ea3d. * Revert "Clear VCS fsbackend and git_pillar locks on master start" This reverts commit 7e3caa9bae1ac4de62db9924374e35a8b826937e. * Revert "Add functions to remove VCS fsbackend update locks and git_pillar update/checkout locks" This reverts commit 4c2db32419022501eae2a695ec488693e043d189. * prevent eternal gitfs lock due to process crash * Use salt.utils.fopen() instead of open() * Make pid locking work for more than just gitfs Also, make logging more descriptive, to aid in troubleshooting. * Add git_pillar_global_lock config option default value * Document proper usage of {gitfs,git_pillar}_global_lock * Fix comments value in salt.states.pkgrepo example (#32604) 'comments' option adds '#' automatically. Example contains `#http://mirror.centos.org/centos/$releasever/os/$basearch/` string which becomes prefixed with '##' in generated file. * alphabetize directories for dynamic modules (#32599) Also add engines and proxy minions to the list. * Expand on the open-source vs open-core FAQ * Language clarification. * Fix some mistakes in the salt-ssh thin shell script (#32583) * [[ is bash, not compatible with /bin/sh * check if python command exists before calling it * Deprecate 'user' and 'group' in state cmd (#32613) * Remove unused 'group' argument * Fix unit testing of cmd.mod_run_check without group arg * Deprecate 'user/group' in cmd.run * Deprecate 'user'/'group' in cmd.script * Deprecate 'user' in cmd.wait * Deprecate 'user'/'group' in cmd.wait_script * Fix mod_run_check without 'group' * Push deprecation back one release * Fix mac_service and mac_system modules (#32587) * Fix mac_service module * Add integration tests for new functions * Start will not enable the service beforehand * Remove unused variables
56 lines
1.8 KiB
ReStructuredText
56 lines
1.8 KiB
ReStructuredText
.. _module-sync:
|
|
.. _dynamic-module-distribution:
|
|
|
|
===========================
|
|
Dynamic Module Distribution
|
|
===========================
|
|
|
|
.. versionadded:: 0.9.5
|
|
|
|
Custom Salt execution, state, and other modules can be distributed to Salt
|
|
minions using the Salt file server.
|
|
|
|
Under the root of any environment defined via the :conf_master:`file_roots`
|
|
option on the master server directories corresponding to the type of module can
|
|
be used.
|
|
|
|
The directories are prepended with an underscore:
|
|
|
|
- :file:`_beacons`
|
|
- :file:`_engines`
|
|
- :file:`_grains`
|
|
- :file:`_modules`
|
|
- :file:`_output`
|
|
- :file:`_proxy`
|
|
- :file:`_renderers`
|
|
- :file:`_returners`
|
|
- :file:`_states`
|
|
- :file:`_utils`
|
|
|
|
The contents of these directories need to be synced over to the minions after
|
|
Python modules have been created in them. There are a number of ways to sync
|
|
the modules.
|
|
|
|
Sync Via States
|
|
===============
|
|
|
|
The minion configuration contains an option ``autoload_dynamic_modules``
|
|
which defaults to ``True``. This option makes the state system refresh all
|
|
dynamic modules when states are run. To disable this behavior set
|
|
:conf_minion:`autoload_dynamic_modules` to ``False`` in the minion config.
|
|
|
|
When dynamic modules are autoloaded via states, modules only pertinent to
|
|
the environments matched in the master's top file are downloaded.
|
|
|
|
This is important to remember, because modules can be manually loaded from
|
|
any specific environment that environment specific modules will be loaded
|
|
when a state run is executed.
|
|
|
|
Sync Via the saltutil Module
|
|
============================
|
|
|
|
The saltutil module has a number of functions that can be used to sync all
|
|
or specific dynamic modules. The saltutil module function ``saltutil.sync_all``
|
|
will sync all module types over to a minion. For more information see:
|
|
:mod:`salt.modules.saltutil`
|