You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to redefine the sources for ``map.jinja`` to load values from our new configuration files, we provide a global configuration for all our minions.
145
145
@@ -177,7 +177,7 @@ The syntax is explained later at `Sources of configuration values`_.
177
177
178
178
179
179
Bind roles to minions
180
-
`````````````````````
180
+
~~~~~~~~~~~~~~~~~~~~~
181
181
182
182
We associate roles `grains`_ to minion using `grains.append`_.
183
183
@@ -198,7 +198,7 @@ For the clients:
198
198
Since we used ``Y:C@roles``, ``map.jinja`` will do a ``salt['config.get']('roles')`` to retrieve the roles so you could use any other method to bind roles to minions (`pillars`_ or `SDB`_) but `grains`_ seems to be the preferred method.
199
199
200
200
Note for Microsoft Windows systems
201
-
``````````````````````````````````
201
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
202
202
203
203
If you have a minion running under windows, you can't use colon ``:`` as a delimiter for grain path query (see `bug 58726`_) in which case you should use an alternate delimiter:
204
204
@@ -265,7 +265,7 @@ Here is a valid example:
265
265
266
266
267
267
Using Jinja2 YAML template
268
-
``````````````````````````
268
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
269
269
270
270
You can provide a Jinja2 YAML template file with a name suffixed with ``.yaml.jinja``, it must produce a YAML file conform to the `Format of configuration YAML files`_, for example:
271
271
@@ -296,7 +296,7 @@ For the values loaded from YAML files, ``map.jinja`` will automatically try to l
296
296
After loading values from all sources, it will try to include the ``salt://parameters/post-map.jinja`` Jinja file if it exists which can post-process the ``mapdata`` variable.
297
297
298
298
Configuring ``map.jinja`` sources
299
-
`````````````````````````````````
299
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
300
300
301
301
The ``map.jinja`` file uses several sources where to lookup parameter values. The list of sources can be configured in two places:
302
302
@@ -373,7 +373,7 @@ This is strictly equivalent to the following ``map_jinja.yaml.jinja``:
373
373
374
374
375
375
Loading values from the configuration sources
376
-
`````````````````````````````````````````````
376
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
377
377
378
378
For each configuration source defined, ``map.jinja`` will:
379
379
@@ -399,7 +399,7 @@ There will be no error if a YAML or Jinja2 file does not exists, they are all op
399
399
400
400
401
401
Configuration values from ``salt['config.get']``
402
-
````````````````````````````````````````````````
402
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
403
403
404
404
For sources with of type ``C`` declared in ``map_jinja:sources``, you can configure the ``merge`` option of `salt['config.get']`_ by defining per formula ``strategy`` configuration key (retrieved with ``salt['config.get'](tplroot ~ ':strategy')`` with one of the following values:
405
405
@@ -410,7 +410,7 @@ By default, no merging is done, the first value found is returned.
410
410
411
411
412
412
Global view of the order of preferences
413
-
```````````````````````````````````````
413
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
414
414
415
415
To summarise, here is a complete example of the load order of formula configuration values for an ``AMD64`` ``Ubuntu 18.04`` minion named ``minion1.example.net`` for the ``libvirt`` formula:
0 commit comments