File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -325,6 +325,7 @@ We can simplify the ``conf.sls`` with the new ``files_switch`` macro to use in t
325
325
326
326
327
327
* This uses ``config.get ``, searching for ``ntp:tofs:source_files:Configure NTP `` to determine the list of template files to use.
328
+ * If this returns a result, the default of ``['/etc/ntp.conf.jinja'] `` will be appended to it.
328
329
* If this does not yield any results, the default of ``['/etc/ntp.conf.jinja'] `` will be used.
329
330
330
331
In ``libtofs.jinja ``, we define this new macro ``files_switch ``.
@@ -426,18 +427,20 @@ The list of ``source_files`` can be given:
426
427
tofs:
427
428
source_files:
428
429
Configure NTP:
429
- - '/etc/ntp.conf.jinja'
430
430
- '/etc/ntp.conf_alt.jinja'
431
431
432
432
Resulting in:
433
433
434
434
.. code-block :: sls
435
435
436
436
- source:
437
- - salt://ntp/files/theminion/etc/ntp.conf.jinja
438
437
- salt://ntp/files/theminion/etc/ntp.conf_alt.jinja
439
- - salt://ntp/files/Debian /etc/ntp.conf.jinja
438
+ - salt://ntp/files/theminion /etc/ntp.conf.jinja
440
439
- salt://ntp/files/Debian/etc/ntp.conf_alt.jinja
441
- - salt://ntp/files/default /etc/ntp.conf.jinja
440
+ - salt://ntp/files/Debian /etc/ntp.conf.jinja
442
441
- salt://ntp/files/default/etc/ntp.conf_alt.jinja
442
+ - salt://ntp/files/default/etc/ntp.conf.jinja
443
+
444
+ Note: This does *not * override the default value.
445
+ Rather, the value from the pillar/config is prepended to the default.
443
446
You can’t perform that action at this time.
0 commit comments