From 8cbe82e039817cd0faa03222e30c3c5757cfd416 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Sat, 1 Jun 2019 20:25:27 -0400 Subject: [PATCH 1/3] Modular Systems: Document saltenvs and modules --- doc/topics/development/modules/index.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/topics/development/modules/index.rst b/doc/topics/development/modules/index.rst index e95a485759c..e200ece8b82 100644 --- a/doc/topics/development/modules/index.rst +++ b/doc/topics/development/modules/index.rst @@ -55,9 +55,6 @@ prepended by underscore, such as: Modules must be synced before they can be used. This can happen a few ways, discussed below. -.. note: - Using saltenvs besides ``base`` may not work in all contexts. - Sync Via States ~~~~~~~~~~~~~~~ @@ -78,6 +75,15 @@ or specific dynamic modules. The ``saltutil.sync_*`` :py:mod:`runner functions ` can be used to sync modules to minions and the master, respectively. +About saltenvs +~~~~~~~~~~~~~~ + +In either of the above cases, which saltenvs are synced from are based on the topfiles. (Unless specified manually.) + +The minion syncs modules from saltenvs that mention the minion in the saltenv's topfile. + +That is, for each saltenv on the file server, if a minion is mentioned in that saltenv's topfile, the minion will load modules from that saltenv. + The extmods Directory --------------------- From b5cec62be33aa1db6affd64fa6f2f7ce087a3f3a Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Sat, 1 Jun 2019 20:44:43 -0400 Subject: [PATCH 2/3] Rephrase and restructure better. --- doc/topics/development/modules/index.rst | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/topics/development/modules/index.rst b/doc/topics/development/modules/index.rst index e200ece8b82..3cd41b317e5 100644 --- a/doc/topics/development/modules/index.rst +++ b/doc/topics/development/modules/index.rst @@ -64,7 +64,7 @@ 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, only the modules defined in the -same saltenvs as the states currently being run. +same saltenv as the states currently being run are synced. Sync Via the saltutil Module ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -75,10 +75,7 @@ or specific dynamic modules. The ``saltutil.sync_*`` :py:mod:`runner functions ` can be used to sync modules to minions and the master, respectively. -About saltenvs -~~~~~~~~~~~~~~ - -In either of the above cases, which saltenvs are synced from are based on the topfiles. (Unless specified manually.) +Which saltenvs that the minion syncs from is based on the topfiles. (Unless specified manually.) The minion syncs modules from saltenvs that mention the minion in the saltenv's topfile. From f68568d6c3519ba6f8a62819e649f163c0c9ccb7 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 26 Jun 2019 16:24:01 -0400 Subject: [PATCH 3/3] Use @mchugh19's suggestion --- doc/topics/development/modules/index.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/doc/topics/development/modules/index.rst b/doc/topics/development/modules/index.rst index 3cd41b317e5..97d43ef4da2 100644 --- a/doc/topics/development/modules/index.rst +++ b/doc/topics/development/modules/index.rst @@ -75,11 +75,7 @@ or specific dynamic modules. The ``saltutil.sync_*`` :py:mod:`runner functions ` can be used to sync modules to minions and the master, respectively. -Which saltenvs that the minion syncs from is based on the topfiles. (Unless specified manually.) - -The minion syncs modules from saltenvs that mention the minion in the saltenv's topfile. - -That is, for each saltenv on the file server, if a minion is mentioned in that saltenv's topfile, the minion will load modules from that saltenv. +If saltenv environments are used (through the :ref:`top file `, the :conf_minion:`environment` option of the minion configuration file, or as an argument on the command line) modules will be synced from the applied environments. The extmods Directory