tuto:linux:saltstack
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
tuto:linux:saltstack [2018/03/22 22:27] – [Gestion gitfs] root | tuto:linux:saltstack [2019/07/29 17:54] (Version actuelle) – [Renderer en python] root | ||
---|---|---|---|
Ligne 577: | Ligne 577: | ||
</ | </ | ||
+ | |||
+ | < | ||
+ | {% set name = { | ||
+ | ' | ||
+ | ' | ||
+ | }.get(grains.os_family) %} | ||
+ | </ | ||
===== Executer un module ===== | ===== Executer un module ===== | ||
* Appeler un module : | * Appeler un module : | ||
Ligne 1593: | Ligne 1600: | ||
- https:// | - https:// | ||
</ | </ | ||
+ | |||
+ | **roots** correspond aux **file_roots**. | ||
Chaque tag ou branche est accessible avec saltenv : | Chaque tag ou branche est accessible avec saltenv : | ||
Ligne 1600: | Ligne 1609: | ||
</ | </ | ||
+ | < | ||
+ | La branche **master** correspond au saltenv **base** ! | ||
+ | </ | ||
+ | |||
+ | ===== Créer son propre module ===== | ||
+ | https:// | ||
+ | |||
+ | ===== Créer son propre state ===== | ||
+ | https:// | ||
+ | |||
+ | ===== Créer son propre grain ===== | ||
+ | https:// | ||
+ | ===== Client salt en python ===== | ||
+ | https:// | ||
+ | |||
+ | ===== Renderer en python ===== | ||
+ | https:// | ||
+ | |||
+ | ===== Vars selon context ===== | ||
+ | < | ||
+ | auth: | ||
+ | - __path__ (path to your module dir) | ||
+ | |||
+ | modules: | ||
+ | - __pillar__ | ||
+ | - __salt__ | ||
+ | - __opts__ | ||
+ | - __context__ ({' | ||
+ | - __grains__ | ||
+ | |||
+ | runners: | ||
+ | - __pillar__ | ||
+ | - __salt__ | ||
+ | - __opts__ | ||
+ | - __grains__ | ||
+ | |||
+ | returners: | ||
+ | - __salt__ | ||
+ | - __opts__ | ||
+ | - __pillar__ | ||
+ | - __grains__ | ||
+ | |||
+ | pillars: | ||
+ | - __salt__ (modules) | ||
+ | - __opts__ | ||
+ | - __pillar__ | ||
+ | - __grains__ | ||
+ | |||
+ | # nothing | ||
+ | tops: | ||
+ | - [' | ||
+ | |||
+ | outputters: | ||
+ | - __opts__ | ||
+ | - __pillar__ | ||
+ | - __grains__ | ||
+ | |||
+ | states: | ||
+ | - __pillar__ | ||
+ | - __low__ (lowstate structure?) | ||
+ | - __env__ | ||
+ | - __running__ | ||
+ | - __lowstate__ | ||
+ | - __salt__ | ||
+ | - __opts__ | ||
+ | - __grains__ | ||
+ | |||
+ | log_handlers: | ||
+ | - __path__ | ||
+ | |||
+ | renderers: | ||
+ | - __salt__ - Execution functions (i.e. __salt__[' | ||
+ | - __grains__ - Grains (i.e. __grains__[' | ||
+ | - __pillar__ - Pillar data (i.e. __pillar__[' | ||
+ | - __opts__ - Minion configuration options | ||
+ | - __env__ - The effective salt fileserver environment (i.e. base). Also referred to as a " | ||
+ | Using the saltenv argument on the salt CLI (i.e. salt ' | ||
+ | By adding a saltenv argument to an individual state within the SLS file. In other words, adding a line like this to the state' | ||
+ | - __sls__ - The SLS path of the file. For example, if the root of the base environment is /srv/salt, and the SLS file is / | ||
+ | |||
+ | grains: | ||
+ | - __salt__ | ||
+ | - __opts__ | ||
+ | - __pillar__ | ||
+ | - __grains__ | ||
+ | </ | ||
===== Debug ===== | ===== Debug ===== | ||
* Option debug (**-l debug**) : | * Option debug (**-l debug**) : |
tuto/linux/saltstack.txt · Dernière modification : 2019/07/29 17:54 de root