Saltstack Official Salt Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 6 години
преди 6 години
преди 6 години
преди 6 години
преди 6 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 9 години
преди 9 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 8 години
преди 8 години
преди 8 години
преди 8 години
преди 8 години
преди 8 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 9 години
преди 9 години
преди 9 години
преди 8 години
преди 11 години
преди 11 години
преди 11 години
Fixed pillar_roots generation for salt-master. With a simple pillar like this:: $ sudo salt-call --config-dir /srv/etc/bootstrap --pillar-root /srv/pillar pillar.get salt:pillar_roots local: ---------- base: - /srv/pillar This was generated in /etc/salt/master.d/f_defaults.conf:: # highstate format, and is generally just key/value pairs. pillar_roots:base:- /srv/pillar # Resulting in parse errors by salt:: $ sudo salt '*' state.highstate [ERROR ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key in "<string>", line 531, column 1: pillar_roots:base:- /srv/pillar ^ could not found expected ':' in "<string>", line 532, column 1: # ^ [ERROR ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key in "<string>", line 531, column 1: pillar_roots:base:- /srv/pillar ^ could not found expected ':' in "<string>", line 532, column 1: # ^ This patch will fix it as such:: ID: salt-master Function: file.recurse Name: /etc/salt/master.d Result: True Comment: Recursively updated /etc/salt/master.d Started: 11:37:12.946823 Duration: 6255.296 ms Changes: ---------- /etc/salt/master.d/f_defaults.conf: ---------- diff: --- +++ @@ -528,7 +528,9 @@ # Pillar is laid out in the same fashion as the file server, with environments, # a top file and sls files. However, pillar data does not need to be in the # highstate format, and is generally just key/value pairs. -pillar_roots:base:- /srv/pillar +pillar_roots: + base: + - /srv/pillar # Resulting in:: # highstate format, and is generally just key/value pairs. pillar_roots: base: - /srv/pillar #
преди 9 години
Fixed pillar_roots generation for salt-master. With a simple pillar like this:: $ sudo salt-call --config-dir /srv/etc/bootstrap --pillar-root /srv/pillar pillar.get salt:pillar_roots local: ---------- base: - /srv/pillar This was generated in /etc/salt/master.d/f_defaults.conf:: # highstate format, and is generally just key/value pairs. pillar_roots:base:- /srv/pillar # Resulting in parse errors by salt:: $ sudo salt '*' state.highstate [ERROR ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key in "<string>", line 531, column 1: pillar_roots:base:- /srv/pillar ^ could not found expected ':' in "<string>", line 532, column 1: # ^ [ERROR ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key in "<string>", line 531, column 1: pillar_roots:base:- /srv/pillar ^ could not found expected ':' in "<string>", line 532, column 1: # ^ This patch will fix it as such:: ID: salt-master Function: file.recurse Name: /etc/salt/master.d Result: True Comment: Recursively updated /etc/salt/master.d Started: 11:37:12.946823 Duration: 6255.296 ms Changes: ---------- /etc/salt/master.d/f_defaults.conf: ---------- diff: --- +++ @@ -528,7 +528,9 @@ # Pillar is laid out in the same fashion as the file server, with environments, # a top file and sls files. However, pillar data does not need to be in the # highstate format, and is generally just key/value pairs. -pillar_roots:base:- /srv/pillar +pillar_roots: + base: + - /srv/pillar # Resulting in:: # highstate format, and is generally just key/value pairs. pillar_roots: base: - /srv/pillar #
преди 9 години
Fixed pillar_roots generation for salt-master. With a simple pillar like this:: $ sudo salt-call --config-dir /srv/etc/bootstrap --pillar-root /srv/pillar pillar.get salt:pillar_roots local: ---------- base: - /srv/pillar This was generated in /etc/salt/master.d/f_defaults.conf:: # highstate format, and is generally just key/value pairs. pillar_roots:base:- /srv/pillar # Resulting in parse errors by salt:: $ sudo salt '*' state.highstate [ERROR ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key in "<string>", line 531, column 1: pillar_roots:base:- /srv/pillar ^ could not found expected ':' in "<string>", line 532, column 1: # ^ [ERROR ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key in "<string>", line 531, column 1: pillar_roots:base:- /srv/pillar ^ could not found expected ':' in "<string>", line 532, column 1: # ^ This patch will fix it as such:: ID: salt-master Function: file.recurse Name: /etc/salt/master.d Result: True Comment: Recursively updated /etc/salt/master.d Started: 11:37:12.946823 Duration: 6255.296 ms Changes: ---------- /etc/salt/master.d/f_defaults.conf: ---------- diff: --- +++ @@ -528,7 +528,9 @@ # Pillar is laid out in the same fashion as the file server, with environments, # a top file and sls files. However, pillar data does not need to be in the # highstate format, and is generally just key/value pairs. -pillar_roots:base:- /srv/pillar +pillar_roots: + base: + - /srv/pillar # Resulting in:: # highstate format, and is generally just key/value pairs. pillar_roots: base: - /srv/pillar #
преди 9 години
преди 11 години
преди 9 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 8 години
преди 11 години
преди 11 години
преди 8 години
преди 8 години
преди 8 години
преди 8 години
преди 8 години
преди 8 години
преди 8 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 8 години
преди 11 години
преди 8 години
преди 11 години
преди 8 години
преди 8 години
преди 8 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 11 години
преди 10 години
преди 10 години
преди 9 години
преди 9 години
преди 9 години
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852
  1. # This file managed by Salt, do not edit by hand!!
  2. # Based on salt version 2016.11 default config
  3. {% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs', 'engines', 'lxc.network_profile', 'lxc.container_profile', 'reactors'] -%}
  4. {% set cfg_salt = pillar.get('salt', {}) -%}
  5. {% set cfg_master = cfg_salt.get('master', {}) -%}
  6. {% set default_keys = [] -%}
  7. {%- macro get_config(configname, default_value) -%}
  8. {%- do default_keys.append(configname) %}
  9. {%- if configname in cfg_master -%}
  10. {{ configname }}: {{ cfg_master[configname]|json }}
  11. {%- elif configname in cfg_salt and configname not in reserved_keys -%}
  12. {{ configname }}: {{ cfg_salt[configname]|json }}
  13. {%- else -%}
  14. #{{ configname }}: {{ default_value|json }}
  15. {%- endif -%}
  16. {%- endmacro -%}
  17. {%- from 'salt/formulas.jinja' import file_roots, formulas with context -%}
  18. ##### Primary configuration settings #####
  19. ##########################################
  20. # This configuration file is used to manage the behavior of the Salt Master.
  21. # Values that are commented out but have an empty line after the comment are
  22. # defaults that do not need to be set in the config. If there is no blank line
  23. # after the comment then the value is presented as an example and is not the
  24. # default.
  25. # The id to be passed in the publish job to minions.
  26. # This is used for MultiSyndics to return the job to the requesting master.
  27. # This must be the same string as the syndic is configured with.
  28. # master_id: None
  29. {{ get_config('master_id', 'None') }}
  30. # Per default, the master will automatically include all config files
  31. # from master.d/*.conf (master.d is a directory in the same directory
  32. # as the main master config file).
  33. {{ get_config('default_include', 'master.d/*.conf') }}
  34. # The address of the interface to bind to:
  35. {{ get_config('interface', '0.0.0.0') }}
  36. # Whether the master should listen for IPv6 connections. If this is set to True,
  37. # the interface option must be adjusted, too. (For example: "interface: '::'")
  38. {{ get_config('ipv6', 'False') }}
  39. # The tcp port used by the publisher:
  40. {{ get_config('publish_port', '4505') }}
  41. # The user under which the salt master will run. Salt will update all
  42. # permissions to allow the specified user to run the master. The exception is
  43. # the job cache, which must be deleted if this user is changed. If the
  44. # modified files cause conflicts, set verify_env to False.
  45. {{ get_config('user', 'root') }}
  46. # The port used by the communication interface. The ret (return) port is the
  47. # interface used for the file server, authentication, job returns, etc.
  48. {{ get_config('ret_port', '4506') }}
  49. # Specify the location of the daemon process ID file:
  50. {{ get_config('pidfile', '/var/run/salt-master.pid') }}
  51. # The root directory prepended to these options: pki_dir, cachedir,
  52. # sock_dir, log_file, autosign_file, autoreject_file, extension_modules,
  53. # key_logfile, pidfile:
  54. {{ get_config('root_dir', '/') }}
  55. # The path to the master's configuration file.
  56. {{ get_config('conf_file', '/etc/salt/master') }}
  57. # Directory used to store public key data:
  58. {{ get_config('pki_dir', '/etc/salt/pki/master') }}
  59. # Key cache. Increases master speed for large numbers of accepted
  60. # keys. Available options: 'sched'. (Updates on a fixed schedule.)
  61. # Note that enabling this feature means that minions will not be
  62. # available to target for up to the length of the maintanence loop
  63. # which by default is 60s.
  64. {{ get_config('key_cache', '') }}
  65. # Directory to store job and cache data:
  66. # This directory may contain sensitive data and should be protected accordingly.
  67. #
  68. {{ get_config('cachedir', '/var/cache/salt/master') }}
  69. # Directory for custom modules. This directory can contain subdirectories for
  70. # each of Salt's module types such as "runners", "output", "wheel", "modules",
  71. # "states", "returners", etc.
  72. {{ get_config('extension_modules', '<no default>') }}
  73. # Directory for custom modules. This directory can contain subdirectories for
  74. # each of Salt's module types such as "runners", "output", "wheel", "modules",
  75. # "states", "returners", "engines", etc.
  76. # Like 'extension_modules' but can take an array of paths
  77. {% if 'module_dirs' in cfg_master -%}
  78. {%- do default_keys.append('module_dirs') %}
  79. module_dirs:
  80. {%- for dir in cfg_master['module_dirs'] %}
  81. - {{ dir}}
  82. {%- endfor -%}
  83. {% elif 'module_dirs' in cfg_salt -%}
  84. module_dirs:
  85. {%- for dir in cfg_salt['module_dirs'] %}
  86. - {{ dir}}
  87. {%- endfor -%}
  88. {% else -%}
  89. #module_dirs: <no default>
  90. # - /var/cache/salt/minion/extmods
  91. {% endif %}
  92. # Verify and set permissions on configuration directories at startup:
  93. {{ get_config('verify_env', 'True') }}
  94. # Set the number of hours to keep old job information in the job cache:
  95. {{ get_config('keep_jobs', '24') }}
  96. # The number of seconds to wait when the client is requesting information
  97. # about running jobs.
  98. {{ get_config('gather_job_timeout', '10') }}
  99. # Set the default timeout for the salt command and api. The default is 5
  100. # seconds.
  101. {{ get_config('timeout', '5') }}
  102. # The loop_interval option controls the seconds for the master's maintenance
  103. # process check cycle. This process updates file server backends, cleans the
  104. # job cache and executes the scheduler.
  105. {{ get_config('loop_interval', '60') }}
  106. # When using the scheduler at least one schedule needs to be
  107. # defined. The user running the salt master will need read access to the repo.
  108. {% if 'schedule' in cfg_master -%}
  109. {%- do default_keys.append('schedule') %}
  110. schedule:
  111. {%- for schedule in cfg_master['schedule'] %}
  112. {%- if schedule is iterable and schedule is not string %}
  113. {%- for name, children in schedule.items() %}
  114. {{ name }}:
  115. {%- for child in children %}
  116. {%- for key, value in child.items() %}
  117. {{ key }}: {{ value }}
  118. {%- endfor -%}
  119. {%- endfor -%}
  120. {%- endfor -%}
  121. {%- endif -%}
  122. {%- endfor -%}
  123. {%- endif %}
  124. # Set the default outputter used by the salt command. The default is "nested".
  125. {{ get_config('output', 'nested') }}
  126. # Set the default output file used by the salt command. Default is to output
  127. # to the CLI and not to a file. Functions the same way as the "--out-file"
  128. # CLI option, only sets this to a single file for all salt commands.
  129. {{ get_config('output_file', 'None') }}
  130. # Return minions that timeout when running commands like test.ping
  131. {{ get_config('show_timeout', 'True') }}
  132. # By default, output is colored. To disable colored output, set the color value
  133. # to False.
  134. {{ get_config('color', 'True') }}
  135. # Do not strip off the colored output from nested results and state outputs
  136. # (true by default).
  137. {{ get_config('strip_colors', 'False') }}
  138. # To display a summary of the number of minions targeted, the number of
  139. # minions returned, and the number of minions that did not return, set the
  140. # cli_summary value to True. (False by default.)
  141. #
  142. {{ get_config('cli_summary', 'False') }}
  143. # Set the directory used to hold unix sockets:
  144. {{ get_config('sock_dir', '/var/run/salt/master') }}
  145. # The master can take a while to start up when lspci and/or dmidecode is used
  146. # to populate the grains for the master. Enable if you want to see GPU hardware
  147. # data for your master.
  148. {{ get_config('enable_gpu_grains', 'False') }}
  149. # The master maintains a job cache. While this is a great addition, it can be
  150. # a burden on the master for larger deployments (over 5000 minions).
  151. # Disabling the job cache will make previously executed jobs unavailable to
  152. # the jobs system and is not generally recommended.
  153. {{ get_config('job_cache', 'True') }}
  154. # Cache minion grains, pillar and mine data via the cache subsystem in the
  155. # cachedir or a database.
  156. {{ get_config('minion_data_cache', 'True') }}
  157. # Cache subsystem module to use for minion data cache.
  158. {{ get_config('cache', 'localfs') }}
  159. # Enables a fast in-memory cache booster and sets the expiration time.
  160. {{ get_config('memcache_expire_seconds', '0') }}
  161. # Set a memcache limit in items (bank + key) per cache storage (driver + driver_opts).
  162. {{ get_config('memcache_max_items', '1024') }}
  163. # Each time a cache storage got full cleanup all the expired items not just the oldest one.
  164. {{ get_config('memcache_full_cleanup', 'False') }}
  165. # Enable collecting the memcache stats and log it on `debug` log level.
  166. {{ get_config('memcache_debug', 'False') }}
  167. # Store all returns in the given returner.
  168. # Setting this option requires that any returner-specific configuration also
  169. # be set. See various returners in salt/returners for details on required
  170. # configuration values. (See also, event_return_queue below.)
  171. {{ get_config('event_return', 'mysql') }}
  172. # On busy systems, enabling event_returns can cause a considerable load on
  173. # the storage system for returners. Events can be queued on the master and
  174. # stored in a batched fashion using a single transaction for multiple events.
  175. # By default, events are not queued.
  176. {{ get_config('event_return_queue', '0') }}
  177. # Only return events matching tags in a whitelist, supports glob matches.
  178. {% if 'event_return_whitelist' in cfg_master -%}
  179. {%- do default_keys.append('event_return_whitelist') %}
  180. event_return_whitelist:
  181. {%- for event_return in cfg_master['event_return_whitelist'] %}
  182. - {{ event_return }}
  183. {%- endfor -%}
  184. {% elif 'event_return_whitelist' in cfg_salt -%}
  185. event_return_whitelist:
  186. {%- for event_return in cfg_salt['event_return_whitelist'] %}
  187. - {{ event_return }}
  188. {%- endfor -%}
  189. {% else -%}
  190. #event_return_whitelist:
  191. # - salt/master/a_tag
  192. # - salt/run/*/ret
  193. {% endif %}
  194. # Store all event returns **except** the tags in a blacklist supports globs.
  195. {% if 'event_return_blacklist' in cfg_master -%}
  196. {%- do default_keys.append('event_return_blacklist') %}
  197. event_return_blacklist:
  198. {%- for event_return in cfg_master['event_return_blacklist'] %}
  199. - {{ event_return }}
  200. {%- endfor -%}
  201. {% elif 'event_return_blacklist' in cfg_salt -%}
  202. event_return_blacklist:
  203. {%- for event_return in cfg_salt['event_return_blacklist'] %}
  204. - {{ event_return }}
  205. {%- endfor -%}
  206. {% else -%}
  207. #event_return_blacklist:
  208. # - salt/master/not_this_tag
  209. # - salt/wheel/*/ret
  210. {% endif %}
  211. # Passing very large events can cause the minion to consume large amounts of
  212. # memory. This value tunes the maximum size of a message allowed onto the
  213. # master event bus. The value is expressed in bytes.
  214. {{ get_config('max_event_size', '1048576') }}
  215. # By default, the master AES key rotates every 24 hours. The next command
  216. # following a key rotation will trigger a key refresh from the minion which may
  217. # result in minions which do not respond to the first command after a key refresh.
  218. #
  219. # To tell the master to ping all minions immediately after an AES key refresh, set
  220. # ping_on_rotate to True. This should mitigate the issue where a minion does not
  221. # appear to initially respond after a key is rotated.
  222. #
  223. # Note that ping_on_rotate may cause high load on the master immediately after
  224. # the key rotation event as minions reconnect. Consider this carefully if this
  225. # salt master is managing a large number of minions.
  226. #
  227. # If disabled, it is recommended to handle this event by listening for the
  228. # 'aes_key_rotate' event with the 'key' tag and acting appropriately.
  229. {{ get_config('ping_on_rotate', 'False') }}
  230. # By default, the master deletes its cache of minion data when the key for that
  231. # minion is removed. To preserve the cache after key deletion, set
  232. # 'preserve_minion_cache' to True.
  233. #
  234. # WARNING: This may have security implications if compromised minions auth with
  235. # a previous deleted minion ID.
  236. {{ get_config('preserve_minion_cache', 'False') }}
  237. # If max_minions is used in large installations, the master might experience
  238. # high-load situations because of having to check the number of connected
  239. # minions for every authentication. This cache provides the minion-ids of
  240. # all connected minions to all MWorker-processes and greatly improves the
  241. # performance of max_minions.
  242. {{ get_config('con_cache', 'False') }}
  243. # The master can include configuration from other files. To enable this,
  244. # pass a list of paths to this option. The paths can be either relative or
  245. # absolute; if relative, they are considered to be relative to the directory
  246. # the main master configuration file lives in (this file). Paths can make use
  247. # of shell-style globbing. If no files are matched by a path passed to this
  248. # option, then the master will log a warning message.
  249. #
  250. # Include a config file from some other path:
  251. # include: /etc/salt/extra_config
  252. #
  253. # Include config from several files and directories:
  254. # include:
  255. # - /etc/salt/extra_config
  256. {{ get_config('include', '[]') }}
  257. ##### Large-scale tuning settings #####
  258. ##########################################
  259. # Max open files
  260. #
  261. # Each minion connecting to the master uses AT LEAST one file descriptor, the
  262. # master subscription connection. If enough minions connect you might start
  263. # seeing on the console (and then salt-master crashes):
  264. # Too many open files (tcp_listener.cpp:335)
  265. # Aborted (core dumped)
  266. #
  267. # By default this value will be the one of `ulimit -Hn`, ie, the hard limit for
  268. # max open files.
  269. #
  270. # If you wish to set a different value than the default one, uncomment and
  271. # configure this setting. Remember that this value CANNOT be higher than the
  272. # hard limit. Raising the hard limit depends on your OS and/or distribution,
  273. # a good way to find the limit is to search the internet. For example:
  274. # raise max open files hard limit debian
  275. #
  276. {{ get_config('max_open_files', '100000') }}
  277. # The number of worker threads to start. These threads are used to manage
  278. # return calls made from minions to the master. If the master seems to be
  279. # running slowly, increase the number of threads. This setting can not be
  280. # set lower than 3.
  281. {{ get_config('worker_threads', '5') }}
  282. # Set the ZeroMQ high water marks
  283. # http://api.zeromq.org/3-2:zmq-setsockopt
  284. # The listen queue size / backlog
  285. {{ get_config('zmq_backlog', '1000') }}
  286. # The publisher interface ZeroMQPubServerChannel
  287. {{ get_config('pub_hwm', '1000') }}
  288. # These two ZMQ HWM settings, salt_event_pub_hwm and event_publisher_pub_hwm
  289. # are significant for masters with thousands of minions. When these are
  290. # insufficiently high it will manifest in random responses missing in the CLI
  291. # and even missing from the job cache. Masters that have fast CPUs and many
  292. # cores with appropriate worker_threads will not need these set as high.
  293. # On deployment with 8,000 minions, 2.4GHz CPUs, 24 cores, 32GiB memory has
  294. # these settings:
  295. #
  296. # salt_event_pub_hwm: 128000
  297. # event_publisher_pub_hwm: 64000
  298. # ZMQ high-water-mark for SaltEvent pub socket
  299. {{ get_config('salt_event_pub_hwm', '20000') }}
  300. # ZMQ high-water-mark for EventPublisher pub socket
  301. {{ get_config('event_publisher_pub_hwm', '10000') }}
  302. # The master may allocate memory per-event and not
  303. # reclaim it.
  304. # To set a high-water mark for memory allocation, use
  305. # ipc_write_buffer to set a high-water mark for message
  306. # buffering.
  307. # Value: In bytes. Set to 'dynamic' to have Salt select
  308. # a value for you. Default is disabled.
  309. {%- if 'ipc_write_buffer' in cfg_master %}
  310. {{ get_config('ipc_write_buffer', 'dynamic') }}
  311. {%- else %}
  312. # ipc_write_buffer: 'dynamic'
  313. {%- endif %}
  314. ##### Security settings #####
  315. ##########################################
  316. # Enable "open mode", this mode still maintains encryption, but turns off
  317. # authentication, this is only intended for highly secure environments or for
  318. # the situation where your keys end up in a bad state. If you run in open mode
  319. # you do so at your own risk!
  320. {{ get_config('open_mode', 'False') }}
  321. # Enable auto_accept, this setting will automatically accept all incoming
  322. # public keys from the minions. Note that this is insecure.
  323. {{ get_config('auto_accept', 'False') }}
  324. # Time in minutes that an incoming public key with a matching name found in
  325. # pki_dir/minion_autosign/keyid is automatically accepted. Expired autosign keys
  326. # are removed when the master checks the minion_autosign directory.
  327. # 0 equals no timeout
  328. {{ get_config('autosign_timeout', '120') }}
  329. # If the autosign_file is specified, incoming keys specified in the
  330. # autosign_file will be automatically accepted. This is insecure. Regular
  331. # expressions as well as globing lines are supported.
  332. {{ get_config('autosign_file', '/etc/salt/autosign.conf') }}
  333. # Works like autosign_file, but instead allows you to specify minion IDs for
  334. # which keys will automatically be rejected. Will override both membership in
  335. # the autosign_file and the auto_accept setting.
  336. {{ get_config('autoreject_file', '/etc/salt/autoreject.conf') }}
  337. # Enable permissive access to the salt keys. This allows you to run the
  338. # master or minion as root, but have a non-root group be given access to
  339. # your pki_dir. To make the access explicit, root must belong to the group
  340. # you've given access to. This is potentially quite insecure. If an autosign_file
  341. # is specified, enabling permissive_pki_access will allow group access to that
  342. # specific file.
  343. {{ get_config('permissive_pki_access', 'False') }}
  344. # Allow users on the master access to execute specific commands on minions.
  345. # This setting should be treated with care since it opens up execution
  346. # capabilities to non root users. By default this capability is completely
  347. # disabled.
  348. #publisher_acl:
  349. # larry:
  350. # - test.ping
  351. # - network.*
  352. # - '*':
  353. # - pkg.*
  354. #
  355. {% if 'publisher_acl' in cfg_master -%}
  356. {%- do default_keys.append('publisher_acl') %}
  357. publisher_acl:
  358. {%- for user, commands in cfg_master['publisher_acl']|dictsort %}
  359. {{ user }}:
  360. {%- for command in commands %}
  361. {%- if command is mapping %}
  362. {%- for target, targetcommands in command.items() %}
  363. - {% raw %}'{% endraw %}{{ target }}{% raw %}'{% endraw %}:
  364. {%- for targetcommand in targetcommands %}
  365. - {% raw %}'{% endraw %}{{ targetcommand }}{% raw %}'{% endraw %}
  366. {%- endfor -%}
  367. {%- endfor -%}
  368. {%- else %}
  369. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  370. {%- endif %}
  371. {%- endfor -%}
  372. {%- endfor -%}
  373. {% elif 'publisher_acl' in cfg_salt -%}
  374. publisher_acl:
  375. {%- for user, commands in cfg_salt['publisher_acl']|dictsort %}
  376. {{ user }}:
  377. {%- for command in commands %}
  378. {%- if command is mapping %}
  379. {%- for target, targetcommands in command.items() %}
  380. - {% raw %}'{% endraw %}{{ target }}{% raw %}'{% endraw %}:
  381. {%- for targetcommand in targetcommands %}
  382. - {% raw %}'{% endraw %}{{ targetcommand }}{% raw %}'{% endraw %}
  383. {%- endfor -%}
  384. {%- endfor -%}
  385. {%- else %}
  386. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  387. {%- endif %}
  388. {%- endfor -%}
  389. {%- endfor -%}
  390. {% elif 'client_acl' in cfg_master -%}
  391. {%- do default_keys.append('client_acl') %}
  392. publisher_acl:
  393. {%- for name, user in cfg_master['client_acl']|dictsort %}
  394. {{ name}}:
  395. {%- for command in user %}
  396. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  397. {%- endfor -%}
  398. {%- endfor -%}
  399. {% elif 'client_acl' in cfg_salt -%}
  400. publisher_acl:
  401. {%- for name, user in cfg_salt['client_acl']|dictsort %}
  402. {{ name }}:
  403. {%- for command in user %}
  404. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  405. {%- endfor -%}
  406. {%- endfor -%}
  407. {% else -%}
  408. {%- endif %}
  409. # Blacklist any of the following users or modules
  410. #
  411. # This example would blacklist all non sudo users, including root from
  412. # running any commands. It would also blacklist any use of the "cmd"
  413. # module. This is completely disabled by default.
  414. #
  415. #
  416. # Check the list of configured users in client ACL against users on the
  417. # system and throw errors if they do not exist.
  418. {{ get_config('client_acl_verify', 'True') }}
  419. #
  420. {% if 'publisher_acl_blacklist' in cfg_master %}
  421. {%- do default_keys.append('publisher_acl_blacklist') %}
  422. publisher_acl_blacklist:
  423. users:
  424. {% for user in cfg_master['publisher_acl_blacklist'].get('users', []) %}
  425. - {{ user }}
  426. {% endfor %}
  427. modules:
  428. {% for mod in cfg_master['publisher_acl_blacklist'].get('modules', []) %}
  429. - {{ mod }}
  430. {% endfor %}
  431. {% elif 'publisher_acl_blacklist' in cfg_salt %}
  432. publisher_acl_blacklist:
  433. users:
  434. {% for user in cfg_salt['publisher_acl_blacklist'].get('users', []) %}
  435. - {{ user }}
  436. {% endfor %}
  437. modules:
  438. {% for mod in cfg_salt['publisher_acl_blacklist'].get('modules', []) %}
  439. - {{ mod }}
  440. {% endfor %}
  441. {% elif 'client_acl_blacklist' in cfg_master %}
  442. {%- do default_keys.append('client_acl_blacklist') %}
  443. publisher_acl_blacklist:
  444. users:
  445. {% for user in cfg_master['client_acl_blacklist'].get('users', []) %}
  446. - {{ user }}
  447. {% endfor %}
  448. modules:
  449. {% for mod in cfg_master['client_acl_blacklist'].get('modules', []) %}
  450. - {{ mod }}
  451. {% endfor %}
  452. {% elif 'client_acl_blacklist' in cfg_salt %}
  453. publisher_acl_blacklist:
  454. users:
  455. {% for user in cfg_salt['client_acl_blacklist'].get('users', []) %}
  456. - {{ user }}
  457. {% endfor %}
  458. modules:
  459. {% for mod in cfg_salt['client_acl_blacklist'].get('modules', []) %}
  460. - {{ mod }}
  461. {% endfor %}
  462. {% else %}
  463. #publisher_acl_blacklist:
  464. # users:
  465. # - root
  466. # - '^(?!sudo_).*$' # all non sudo users
  467. # modules:
  468. # - cmd
  469. {% endif %}
  470. #
  471. # WARNING: client_acl and client_acl_blacklist options are deprecated and will
  472. # be removed in the future releases. Use publisher_acl and
  473. # publisher_acl_blacklist instead.
  474. # Enforce publisher_acl & publisher_acl_blacklist when users have sudo
  475. # access to the salt command.
  476. {{ get_config('sudo_acl', 'False') }}
  477. # The external auth system uses the Salt auth modules to authenticate and
  478. # validate users to access areas of the Salt system.
  479. #external_auth:
  480. # pam:
  481. # fred:
  482. # - test.*
  483. {%- if 'external_auth' in cfg_master %}
  484. {%- do default_keys.append('external_auth') %}
  485. external_auth:
  486. {%- for auth, users in cfg_master['external_auth']|dictsort %}
  487. {{ auth }}:
  488. {%- for user, commands in users.items() %}
  489. {%- if user.startswith('^') %}
  490. {{ user }}: {% raw %}'{% endraw %}{{ commands }}{% raw %}'{% endraw %}
  491. {%- else %}
  492. {{ user }}:
  493. {%- for command in commands %}
  494. {%- if command is mapping %}
  495. {%- for target, targetcommands in command.items() %}
  496. - {% raw %}'{% endraw %}{{ target }}{% raw %}'{% endraw %}:
  497. {%- for targetcommand in targetcommands %}
  498. {%- if targetcommand is mapping %}
  499. {%- for module, options in targetcommand.items() %}
  500. - {% raw %}'{% endraw %}{{ module }}{% raw %}'{% endraw %}:
  501. {%- for category, arguments in options.items() %}
  502. {% raw %}'{% endraw %}{{ category }}{% raw %}'{% endraw %}:
  503. {%- if arguments is mapping %}
  504. {%- for key, argument in arguments.items() %}
  505. {% raw %}'{% endraw %}{{ key }}{% raw %}'{% endraw %}: {% raw %}'{% endraw %}{{ argument }}{% raw %}'{% endraw %}
  506. {%- endfor %}
  507. {%- else %}
  508. {%- for argument in arguments %}
  509. - {% raw %}'{% endraw %}{{ argument }}{% raw %}'{% endraw %}
  510. {%- endfor %}
  511. {%- endif %}
  512. {%- endfor %}
  513. {%- endfor %}
  514. {%- else %}
  515. - {% raw %}'{% endraw %}{{ targetcommand }}{% raw %}'{% endraw %}
  516. {%- endif %}
  517. {%- endfor %}
  518. {%- endfor %}
  519. {%- else %}
  520. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  521. {%- endif %}
  522. {%- endfor -%}
  523. {%- endif %}
  524. {%- endfor -%}
  525. {%- endfor -%}
  526. {%- endif %}
  527. # Time (in seconds) for a newly generated token to live. Default: 12 hours
  528. {{ get_config('token_expire', '43200') }}
  529. #
  530. # Allow eauth users to specify the expiry time of the tokens they generate.
  531. # A boolean applies to all users or a dictionary of whitelisted eauth backends
  532. # and usernames may be given.
  533. # token_expire_user_override:
  534. # pam:
  535. # - fred
  536. # - tom
  537. # ldap:
  538. # - gary
  539. #
  540. #token_expire_user_override: False
  541. # Allow minions to push files to the master. This is disabled by default, for
  542. # security purposes.
  543. {{ get_config('file_recv', 'False') }}
  544. # Set a hard-limit on the size of the files that can be pushed to the master.
  545. # It will be interpreted as megabytes. Default: 100
  546. {{ get_config('file_recv_max_size', '100') }}
  547. # Signature verification on messages published from the master.
  548. # This causes the master to cryptographically sign all messages published to its event
  549. # bus, and minions then verify that signature before acting on the message.
  550. #
  551. # This is False by default.
  552. #
  553. # Note that to facilitate interoperability with masters and minions that are different
  554. # versions, if sign_pub_messages is True but a message is received by a minion with
  555. # no signature, it will still be accepted, and a warning message will be logged.
  556. # Conversely, if sign_pub_messages is False, but a minion receives a signed
  557. # message it will be accepted, the signature will not be checked, and a warning message
  558. # will be logged. This behavior went away in Salt 2014.1.0 and these two situations
  559. # will cause minion to throw an exception and drop the message.
  560. {{ get_config('sign_pub_message', 'False') }}
  561. # Use TLS/SSL encrypted connection between master and minion.
  562. # Can be set to a dictionary containing keyword arguments corresponding to Python's
  563. # 'ssl.wrap_socket' method.
  564. # Default is None.
  565. #ssl:
  566. # keyfile: <path_to_keyfile>
  567. # certfile: <path_to_certfile>
  568. # ssl_version: PROTOCOL_TLSv1_2
  569. # Sign the master auth-replies with a cryptographic signature of the masters public key.
  570. # Please see the tutorial how to use these settings in the Multimaster-PKI with Failover Tutorial
  571. {{ get_config('master_sign_pubkey', 'False') }}
  572. # The customizable name of the signing-key-pair without suffix.
  573. # master_sign_key_name: <filename_without_suffix>
  574. {{ get_config('master_sign', '{}') }}
  575. # The name of the file in the masters pki-directory that holds the pre-calculated
  576. # signature of the masters public-key.
  577. # master_pubkey_signature: <filename>
  578. {{ get_config('master_pubkey_signature', '{}') }}
  579. # Instead of computing the signature for each auth-reply, use a pre-calculated signature.
  580. # The master_pubkey_signature must also be set for this.
  581. {{ get_config('master_use_pubkey_signature', 'False') }}
  582. # Rotate the salt-masters AES-key when a minion-public is deleted with salt-key.
  583. # This is a very important security-setting. Disabling it will enable deleted minions to still
  584. # listen in on the messages published by the salt-master.
  585. # Do not disable this unless it is absolutely clear what this does.
  586. {{ get_config('rotate_aes_key', 'True') }}
  587. # Unique ID attribute name for the user. For Active Directory should be set
  588. # to 'sAMAccountName'. Default value is 'memberUid'.
  589. {{ get_config('auth.ldap.accountattributename', 'memberUid') }}
  590. # Set this to True if LDAP is Active Directory. Default is False
  591. {{ get_config('auth.ldap.activedirectory', False) }}
  592. # Bind to LDAP anonymously to determine group membership
  593. # Active Directory does not allow anonymous binds without special configuration
  594. {{ get_config('auth.ldap.anonymous', False) }}
  595. # The base DN under which users can be found in LDAP
  596. {{ get_config('auth.ldap.basedn', '') }}
  597. # The user Salt authenticates to search for a users' Distinguished Name and
  598. # group membership.
  599. {{ get_config('auth.ldap.binddn', '') }}
  600. # The bind password to go along with the bind dn (binddn).
  601. {{ get_config('auth.ldap.bindpw', '') }}
  602. # The filter used to find the DN associated with a user. For most LDAPs use
  603. # the value {% raw %}'uid={{ username }}'{% endraw %}. For Active Directory use the value
  604. # {% raw %}'sAMAccountName={{username}}'{% endraw %}.
  605. {{ get_config('auth.ldap.filter', '') }}
  606. # The attribute used for user group membership. Defaults to 'memberOf'
  607. {{ get_config('auth.ldap.groupattribute', 'memberOf') }}
  608. # LDAP group class. Use 'group' for Active Directory. Defaults to 'posixGroup'
  609. {{ get_config('auth.ldap.groupclass', 'posixGroup') }}
  610. # To specify an OU that contains group data. Not used for Active Directory
  611. # Default value: 'Groups'
  612. {{ get_config('auth.ldap.groupou', 'Groups') }}
  613. # Allows the administrator to strip off a certain set of domain names
  614. # so the hostnames looked up in the directory service can match the minion IDs.
  615. {{ get_config('auth.ldap.minion_stripdomains', []) }}
  616. # Verify server's TLS certificate. Default value: False
  617. {{ get_config('auth.ldap.no_verify', False) }}
  618. # Only for Active Directory. Default value: 'person'
  619. {{ get_config('auth.ldap.persontype', 'person') }}
  620. # Port to connect via. Default value: '389'
  621. {{ get_config('auth.ldap.port', '389') }}
  622. # LDAP scope level, almost always 2. Default value: 2
  623. {{ get_config('auth.ldap.scope', 2) }}
  624. # Server to auth against. Default value: 'localhost'
  625. {{ get_config('auth.ldap.server', 'localhost') }}
  626. # Use TLS when connecting. Default value: False
  627. {{ get_config('auth.ldap.tls', False) }}
  628. # Server specified in URI format. Overrides .ldap.server, .ldap.port,
  629. # .ldap.tls. Default value: ''
  630. {{ get_config('auth.ldap.uri', '') }}
  631. ##### Salt-SSH Configuration #####
  632. ##########################################
  633. # Pass in an alternative location for the salt-ssh roster file
  634. {{ get_config('roster_file', '/etc/salt/roster') }}
  635. # Define locations for roster files so they can be chosen when using Salt API.
  636. # An administrator can place roster files into these locations. Then when
  637. # calling Salt API, parameter 'roster_file' should contain a relative path to
  638. # these locations. That is, "roster_file=/foo/roster" will be resolved as
  639. # "/etc/salt/roster.d/foo/roster" etc. This feature prevents passing insecure
  640. # custom rosters through the Salt API.
  641. #
  642. {%- if 'rosters' in cfg_master %}
  643. rosters:
  644. {% for name in cfg_master['rosters'] -%}
  645. - {{ name }}
  646. {% endfor -%}
  647. {%- else %}
  648. #rosters:
  649. # - /etc/salt/roster.d
  650. # - /opt/salt/some/more/rosters
  651. {%- endif %}
  652. # The log file of the salt-ssh command:
  653. {{ get_config('ssh_log_file', '/var/log/salt/ssh') }}
  654. # Pass in minion option overrides that will be inserted into the SHIM for
  655. # salt-ssh calls. The local minion config is not used for salt-ssh. Can be
  656. # overridden on a per-minion basis in the roster (`minion_opts`)
  657. #ssh_minion_opts:
  658. # gpg_keydir: /root/gpg
  659. {{ get_config('ssh_minion_opts', '{}') }}
  660. # Set this to True to default to using ~/.ssh/id_rsa for salt-ssh
  661. # authentication with minions
  662. {{ get_config('ssh_use_home_key', 'False') }}
  663. ##### Master Module Management #####
  664. ##########################################
  665. # Manage how master side modules are loaded.
  666. # Add any additional locations to look for master runners:
  667. {{ get_config('runner_dirs', '[]') }}
  668. # Enable Cython for master side modules:
  669. {{ get_config('cython_enable', 'False') }}
  670. ##### State System settings #####
  671. ##########################################
  672. # The state system uses a "top" file to tell the minions what environment to
  673. # use and what modules to use. The state_top file is defined relative to the
  674. # root of the base environment as defined in "File Server settings" below.
  675. {{ get_config('state_top', 'top.sls') }}
  676. # The master_tops option replaces the external_nodes option by creating
  677. # a plugable system for the generation of external top data. The external_nodes
  678. # option is deprecated by the master_tops option.
  679. #
  680. # To gain the capabilities of the classic external_nodes system, use the
  681. # following configuration:
  682. # master_tops:
  683. # ext_nodes: <Shell command which returns yaml>
  684. #
  685. #master_tops: {}
  686. {% if 'master_tops' in cfg_master %}
  687. {%- do default_keys.append('master_tops') %}
  688. master_tops:
  689. {%- for master in cfg_master['master_tops'] -%}
  690. {%- if cfg_master['master_tops'][master] is mapping %}
  691. {{ master }}:
  692. {%- for parameter in cfg_master['master_tops'][master] %}
  693. {{ parameter }}: {{ cfg_master['master_tops'][master][parameter] }}
  694. {%- endfor -%}
  695. {%- elif cfg_master['master_tops'][master] is string %}
  696. {{ master }}: {{ cfg_master['master_tops'][master] }}
  697. {%- elif cfg_master['master_tops'][master] is iterable %}
  698. {{ master }}:
  699. {%- for item in cfg_master['master_tops'][master] %}
  700. - {{ item }}
  701. {%- endfor -%}
  702. {%- else %}
  703. {{ master }}: {{ cfg_master['master_tops'][master] }}
  704. {% endif %}
  705. {%- endfor %}
  706. {% endif %}
  707. # The external_nodes option allows Salt to gather data that would normally be
  708. # placed in a top file. The external_nodes option is the executable that will
  709. # return the ENC data. Remember that Salt will look for external nodes AND top
  710. # files and combine the results if both are enabled!
  711. {{ get_config('external_nodes', 'None') }}
  712. # The renderer to use on the minions to render the state data
  713. {{ get_config('renderer', 'yaml_jinja') }}
  714. # The Jinja renderer can strip extra carriage returns and whitespace
  715. # See http://jinja.pocoo.org/docs/api/#high-level-api
  716. #
  717. # If this is set to True the first newline after a Jinja block is removed
  718. # (block, not variable tag!). Defaults to False, corresponds to the Jinja
  719. # environment init variable "trim_blocks".
  720. {{ get_config('jinja_trim_blocks', 'False') }}
  721. #
  722. # If this is set to True leading spaces and tabs are stripped from the start
  723. # of a line to a block. Defaults to False, corresponds to the Jinja
  724. # environment init variable "lstrip_blocks".
  725. {{ get_config('jinja_lstrip_blocks', 'False') }}
  726. # The failhard option tells the minions to stop immediately after the first
  727. # failure detected in the state execution, defaults to False
  728. {{ get_config('failhard', 'False') }}
  729. # The state_verbose and state_output settings can be used to change the way
  730. # state system data is printed to the display. By default all data is printed.
  731. # The state_verbose setting can be set to True or False, when set to False
  732. # all data that has a result of True and no changes will be suppressed.
  733. {{ get_config('state_verbose', 'True') }}
  734. # The state_output setting changes if the output is the full multi line
  735. # output for each changed state if set to 'full', but if set to 'terse'
  736. # the output will be shortened to a single line. If set to 'mixed', the output
  737. # will be terse unless a state failed, in which case that output will be full.
  738. # If set to 'changes', the output will be full unless the state didn't change.
  739. {{ get_config('state_output', 'full') }}
  740. # Automatically aggregate all states that have support for mod_aggregate by
  741. # setting to 'True'. Or pass a list of state module names to automatically
  742. # aggregate just those types.
  743. #
  744. # state_aggregate:
  745. # - pkg
  746. #
  747. #state_aggregate: False
  748. {{ get_config('state_aggregate', '{}') }}
  749. # Send progress events as each function in a state run completes execution
  750. # by setting to 'True'. Progress events are in the format
  751. # 'salt/job/<JID>/prog/<MID>/<RUN NUM>'.
  752. {{ get_config('state_events', 'False') }}
  753. # Enable extra routines for YAML renderer used states containing UTF characters.
  754. {{ get_config('yaml_utf8', 'False') }}
  755. ##### File Server settings #####
  756. ##########################################
  757. # Salt runs a lightweight file server written in zeromq to deliver files to
  758. # minions. This file server is built into the master daemon and does not
  759. # require a dedicated port.
  760. # The file server works on environments passed to the master, each environment
  761. # can have multiple root directories, the subdirectories in the multiple file
  762. # roots cannot match, otherwise the downloaded files will not be able to be
  763. # reliably ensured. A base environment is required to house the top file.
  764. # Example:
  765. # file_roots:
  766. # base:
  767. # - /srv/salt/
  768. # dev:
  769. # - /srv/salt/dev/services
  770. # - /srv/salt/dev/states
  771. # prod:
  772. # - /srv/salt/prod/services
  773. # - /srv/salt/prod/states
  774. #
  775. {% if 'file_roots' in cfg_master -%}
  776. {%- do default_keys.append('file_roots') %}
  777. {{ file_roots(cfg_master['file_roots']) }}
  778. {%- elif 'file_roots' in cfg_salt -%}
  779. {{ file_roots(cfg_salt['file_roots']) }}
  780. {%- elif formulas|length -%}
  781. {{ file_roots({'base': ['/srv/salt']}) }}
  782. {%- else -%}
  783. #file_roots:
  784. # base:
  785. # - /srv/salt
  786. #
  787. {%- endif %}
  788. # When using multiple environments, each with their own top file, the
  789. # default behaviour is an unordered merge. To prevent top files from
  790. # being merged together and instead to only use the top file from the
  791. # requested environment, set this value to 'same'.
  792. {{ get_config('top_file_merging_strategy', 'merge') }}
  793. # To specify the order in which environments are merged, set the ordering
  794. # in the env_order option. Given a conflict, the last matching value will
  795. # win.
  796. {{ get_config('env_order', '["base", "dev", "prod"]') }}
  797. # If top_file_merging_strategy is set to 'same' and an environment does not
  798. # contain a top file, the top file in the environment specified by default_top
  799. # will be used instead.
  800. {{ get_config('default_top', 'base') }}
  801. # The hash_type is the hash to use when discovering the hash of a file on
  802. # the master server. The default is md5 but sha1, sha224, sha256, sha384
  803. # and sha512 are also supported.
  804. #
  805. # WARNING: While md5 and sha1 are also supported, do not use it due to the high chance
  806. # of possible collisions and thus security breach.
  807. #
  808. # Prior to changing this value, the master should be stopped and all Salt
  809. # caches should be cleared.
  810. {{ get_config('hash_type', 'md5') }}
  811. # The buffer size in the file server can be adjusted here:
  812. {{ get_config('file_buffer_size', '1048576') }}
  813. # A regular expression (or a list of expressions) that will be matched
  814. # against the file path before syncing the modules and states to the minions.
  815. # This includes files affected by the file.recurse state.
  816. # For example, if you manage your custom modules and states in subversion
  817. # and don't want all the '.svn' folders and content synced to your minions,
  818. # you could set this to '/\.svn($|/)'. By default nothing is ignored.
  819. {%- if 'file_ignore_regex' in cfg_master %}
  820. {%- do default_keys.append('file_ignore_regex') %}
  821. file_ignore_regex:
  822. {%- for regex in cfg_master['file_ignore_regex'] %}
  823. - {{ regex }}
  824. {%- endfor %}
  825. {%- elif 'file_ignore_regex' in cfg_salt %}
  826. file_ignore_regex:
  827. {%- for regex in cfg_salt['file_ignore_regex'] %}
  828. - {{ regex }}
  829. {%- endfor %}
  830. {%- else %}
  831. #file_ignore_regex:
  832. # - '/\.svn($|/)'
  833. # - '/\.git($|/)'
  834. {%- endif %}
  835. # A file glob (or list of file globs) that will be matched against the file
  836. # path before syncing the modules and states to the minions. This is similar
  837. # to file_ignore_regex above, but works on globs instead of regex. By default
  838. # nothing is ignored.
  839. {%- if 'file_ignore_glob' in cfg_master %}
  840. {%- do default_keys.append('file_ignore_glob') %}
  841. file_ignore_glob:
  842. {%- for glob in cfg_master['file_ignore_glob'] %}
  843. - '{{ glob }}'
  844. {%- endfor %}
  845. {%- elif 'file_ignore_glob' in cfg_salt %}
  846. file_ignore_glob:
  847. {%- for glob in cfg_salt['file_ignore_glob'] %}
  848. - '{{ glob }}'
  849. {%- endfor %}
  850. {%- else %}
  851. # file_ignore_glob:
  852. # - '*.pyc'
  853. # - '*/somefolder/*.bak'
  854. # - '*.swp'
  855. {%- endif %}
  856. # File Server Backend
  857. #
  858. # Salt supports a modular fileserver backend system, this system allows
  859. # the salt master to link directly to third party systems to gather and
  860. # manage the files available to minions. Multiple backends can be
  861. # configured and will be searched for the requested file in the order in which
  862. # they are defined here. The default setting only enables the standard backend
  863. # "roots" which uses the "file_roots" option.
  864. #fileserver_backend:
  865. # - roots
  866. #
  867. # To use multiple backends list them in the order they are searched:
  868. #fileserver_backend:
  869. # - git
  870. # - roots
  871. {% if 'fileserver_backend' in cfg_master -%}
  872. {%- do default_keys.append('fileserver_backend') %}
  873. fileserver_backend:
  874. {%- for backend in cfg_master['fileserver_backend'] %}
  875. - {{ backend }}
  876. {%- endfor -%}
  877. {%- endif %}
  878. # Uncomment the line below if you do not want the file_server to follow
  879. # symlinks when walking the filesystem tree. This is set to True
  880. # by default. Currently this only applies to the default roots
  881. # fileserver_backend.
  882. {{ get_config('fileserver_followsymlinks', 'False') }}
  883. # Uncomment the line below if you do not want symlinks to be
  884. # treated as the files they are pointing to. By default this is set to
  885. # False. By uncommenting the line below, any detected symlink while listing
  886. # files on the Master will not be returned to the Minion.
  887. {{ get_config('fileserver_ignoresymlinks', 'True') }}
  888. # By default, the Salt fileserver recurses fully into all defined environments
  889. # to attempt to find files. To limit this behavior so that the fileserver only
  890. # traverses directories with SLS files and special Salt directories like _modules,
  891. # enable the option below. This might be useful for installations where a file root
  892. # has a very large number of files and performance is impacted. Default is False.
  893. {{ get_config('fileserver_limit_traversal', 'False') }}
  894. # Salt caches the list of files/symlinks/directories for each fileserver backend
  895. # and environment as they are requested, to guard against a performance bottleneck
  896. # at scale when many minions all ask the fileserver which files are available
  897. # simultaneously. This configuration parameter allows for the max age of that
  898. # cache to be altered.
  899. #
  900. # Set this value to 0 to disable use of this cache altogether, but keep in mind
  901. # that this may increase the CPU load on the master when running a highstate on
  902. # a large number of minions.
  903. #
  904. # Rather than altering this configuration parameter, it may be advisable to use
  905. # the fileserver.clear_list_cache runner to clear these caches.
  906. {{ get_config('fileserver_list_cache_time', '20') }}
  907. # The fileserver can fire events off every time the fileserver is updated,
  908. # these are disabled by default, but can be easily turned on by setting this
  909. # flag to True
  910. {{ get_config('fileserver_events', 'False') }}
  911. # Git File Server Backend Configuration
  912. #
  913. # Optional parameter used to specify the provider to be used for gitfs. Must
  914. # be one of the following: pygit2, gitpython, or dulwich. If unset, then each
  915. # will be tried in that same order, and the first one with a compatible
  916. # version installed will be the provider that is used.
  917. {{ get_config('gitfs_provider', 'pygit2') }}
  918. # Along with gitfs_password, is used to authenticate to HTTPS remotes.
  919. {{ get_config('gitfs_user', 'git') }}
  920. # Along with gitfs_user, is used to authenticate to HTTPS remotes.
  921. # This parameter is not required if the repository does not use authentication.
  922. {{ get_config('gitfs_password', '') }}
  923. # By default, Salt will not authenticate to an HTTP (non-HTTPS) remote.
  924. # This parameter enables authentication over HTTP. Enable this at your own risk.
  925. {{ get_config('gitfs_insecure_auth', 'False') }}
  926. # Along with gitfs_privkey (and optionally gitfs_passphrase), is used to
  927. # authenticate to SSH remotes. This parameter (or its per-remote counterpart)
  928. # is required for SSH remotes.
  929. {{ get_config('gitfs_pubkey', '') }}
  930. # Along with gitfs_pubkey (and optionally gitfs_passphrase), is used to
  931. # authenticate to SSH remotes. This parameter (or its per-remote counterpart)
  932. # is required for SSH remotes.
  933. {{ get_config('gitfs_privkey', '') }}
  934. # This parameter is optional, required only when the SSH key being used to
  935. # authenticate is protected by a passphrase.
  936. {{ get_config('gitfs_passphrase', '') }}
  937. # When using the git fileserver backend at least one git remote needs to be
  938. # defined. The user running the salt master will need read access to the repo.
  939. #
  940. # The repos will be searched in order to find the file requested by a client
  941. # and the first repo to have the file will return it.
  942. # When using the git backend branches and tags are translated into salt
  943. # environments.
  944. # Note: file:// repos will be treated as a remote, so refs you want used must
  945. # exist in that repo as *local* refs.
  946. {% if 'gitfs_remotes' in cfg_master -%}
  947. {%- do default_keys.append('gitfs_remotes') %}
  948. gitfs_remotes:
  949. {%- for remote in cfg_master['gitfs_remotes'] %}
  950. {%- if remote is iterable and remote is not string %}
  951. {%- for repo, children in remote.items() %}
  952. - {{ repo }}:
  953. {%- for child in children %}
  954. {%- for key, value in child.items() %}
  955. - {{ key }}: {{ value }}
  956. {%- endfor -%}
  957. {%- endfor -%}
  958. {%- endfor -%}
  959. {%- else %}
  960. - {{ remote }}
  961. {%- endif -%}
  962. {%- endfor -%}
  963. {%- endif %}
  964. #gitfs_remotes:
  965. # - git://github.com/saltstack/salt-states.git
  966. # - file:///var/git/saltmaster
  967. #
  968. # The gitfs_ssl_verify option specifies whether to ignore ssl certificate
  969. # errors when contacting the gitfs backend. You might want to set this to
  970. # false if you're using a git backend that uses a self-signed certificate but
  971. # keep in mind that setting this flag to anything other than the default of True
  972. # is a security concern, you may want to try using the ssh transport.
  973. {{ get_config('gitfs_ssl_verify', 'True') }}
  974. # The gitfs_root option gives the ability to serve files from a subdirectory
  975. # within the repository. The path is defined relative to the root of the
  976. # repository and defaults to the repository root.
  977. {{ get_config('gitfs_root', 'somefolder/otherfolder') }}
  978. # The gitfs_env_whitelist and gitfs_env_blacklist parameters allow for greater
  979. # control over which branches/tags are exposed as fileserver environments.
  980. {% if 'gitfs_env_whitelist' in cfg_master -%}
  981. {%- do default_keys.append('gitfs_env_whitelist') %}
  982. gitfs_env_whitelist:
  983. {%- for git_env in cfg_master['gitfs_env_whitelist'] %}
  984. - {{ git_env }}
  985. {%- endfor -%}
  986. {% else -%}
  987. # gitfs_env_whitelist:
  988. # - base
  989. # - v1.*
  990. {% endif %}
  991. {% if 'gitfs_env_blacklist' in cfg_master -%}
  992. {%- do default_keys.append('gitfs_env_blacklist') %}
  993. gitfs_env_blacklist:
  994. {%- for git_env in cfg_master['gitfs_env_blacklist'] %}
  995. - {{ git_env }}
  996. {%- endfor -%}
  997. {% else -%}
  998. # gitfs_env_blacklist:
  999. # - bug/*
  1000. # - feature/*
  1001. {% endif %}
  1002. # S3 File Server Backend Configuration
  1003. #
  1004. # S3 credentials must be set in the master config file.
  1005. # Alternatively, if on EC2 these credentials can be automatically
  1006. # loaded from instance metadata.
  1007. {% if 's3.keyid' in cfg_master -%}
  1008. {{ get_config('s3.keyid', '<no default>') }}
  1009. {{ get_config('s3.key', '<no default>') }}
  1010. {% else -%}
  1011. # s3.keyid: GKTADJGHEIQSXMKKRBJ08H
  1012. # s3.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
  1013. {% endif %}
  1014. # This fileserver supports two modes of operation for the buckets:
  1015. # - A single bucket per environment
  1016. # - Multiple environments per bucket
  1017. #
  1018. # Note that bucket names must be all lowercase both in the AWS console
  1019. # and in Salt, otherwise you may encounter SignatureDoesNotMatch
  1020. # errors.
  1021. #
  1022. # A multiple-environment bucket must adhere to the following root
  1023. # directory structure:
  1024. #
  1025. # s3://<bucket name>/<environment>/<files>
  1026. #
  1027. # This fileserver back-end requires the use of the MD5 hashing
  1028. # algorithm. MD5 may not be compliant with all security policies.
  1029. {% if 's3.buckets' in cfg_master -%}
  1030. {{ get_config('s3.buckets', '<no default>') }}
  1031. {% else -%}
  1032. # s3.buckets: #single bucket per environment
  1033. # production:
  1034. # - bucket1
  1035. # - bucket2
  1036. # staging:
  1037. # - bucket3
  1038. # - bucket4
  1039. #
  1040. # s3.buckets: #multiple environments per bucket
  1041. # - bucket1
  1042. # - bucket2
  1043. # - bucket3
  1044. # - bucket4
  1045. {% endif %}
  1046. ##### Pillar settings #####
  1047. ##########################################
  1048. # Salt Pillars allow for the building of global data that can be made selectively
  1049. # available to different minions based on minion grain filtering. The Salt
  1050. # Pillar is laid out in the same fashion as the file server, with environments,
  1051. # a top file and sls files. However, pillar data does not need to be in the
  1052. # highstate format, and is generally just key/value pairs.
  1053. {% if 'pillar_roots' in cfg_master -%}
  1054. {%- do default_keys.append('pillar_roots') %}
  1055. pillar_roots:
  1056. {%- for name, roots in cfg_master['pillar_roots']|dictsort %}
  1057. {{ name }}:
  1058. {%- for dir in roots %}
  1059. - {{ dir }}
  1060. {%- endfor -%}
  1061. {%- endfor -%}
  1062. {% elif 'pillar_roots' in cfg_salt -%}
  1063. pillar_roots:
  1064. {%- for name, roots in cfg_salt['pillar_roots']|dictsort %}
  1065. {{ name }}:
  1066. {%- for dir in roots %}
  1067. - {{ dir }}
  1068. {%- endfor -%}
  1069. {%- endfor -%}
  1070. {%- else -%}
  1071. #pillar_roots:
  1072. # base:
  1073. # - /srv/pillar
  1074. #
  1075. {%- endif %}
  1076. {% if 'ext_pillar' in cfg_master %}
  1077. {%- do default_keys.append('ext_pillar') %}
  1078. ext_pillar:
  1079. {%- for pillar in cfg_master['ext_pillar'] -%}
  1080. {%- for key in pillar -%}
  1081. {%- if pillar[key] is string %}
  1082. - {{ key }}: {{ pillar[key] }}
  1083. {%- elif pillar[key] is iterable and pillar[key] is not mapping %}
  1084. - {{ key }}:
  1085. {%- for parameter in pillar[key] %}
  1086. {%- if parameter is iterable and parameter is not string %}
  1087. {%- for param, children in parameter.items() %}
  1088. {%- if children is string %}
  1089. - {{ param }}: {{ children }}
  1090. {%- else %}
  1091. - {{ param }}:
  1092. {%- for child in children %}
  1093. {%- for key, value in child.items() %}
  1094. - {{ key }}: {{ value }}
  1095. {%- endfor -%}
  1096. {%- endfor -%}
  1097. {%- endif -%}
  1098. {%- endfor -%}
  1099. {%- else %}
  1100. - {{ parameter }}
  1101. {%- endif %}
  1102. {%- endfor -%}
  1103. {%- elif pillar[key] is mapping and pillar[key] is not string %}
  1104. - {{ key }}:
  1105. {%- for parameter in pillar[key] %}
  1106. {{ parameter }}: {{pillar[key][parameter]}}
  1107. {%- endfor %}
  1108. {%- else %}
  1109. # Error in rendering {{ key }}, please read https://docs.saltstack.com/en/latest/topics/development/external_pillars.html#configuration
  1110. {% endif %}
  1111. {%- endfor -%}
  1112. {%- endfor %}
  1113. {% elif 'ext_pillar' in cfg_salt %}
  1114. ext_pillar:
  1115. {% for pillar in cfg_salt['ext_pillar'] %}
  1116. - {{ pillar.items()[0][0] }}: {{ pillar.items()[0][1] }}
  1117. {% endfor %}
  1118. {% else %}
  1119. #ext_pillar:
  1120. # - hiera: /etc/hiera.yaml
  1121. # - cmd_yaml: cat /etc/salt/yaml
  1122. {% endif %}
  1123. # The ext_pillar_first option allows for external pillar sources to populate
  1124. # before file system pillar. This allows for targeting file system pillar from
  1125. # ext_pillar.
  1126. {{ get_config('ext_pillar_first', 'False') }}
  1127. # The external pillars permitted to be used on-demand using pillar.ext
  1128. {%- if 'on_demand_ext_pillar' in cfg_master %}
  1129. on_demand_ext_pillar:
  1130. {% for name in cfg_master['on_demand_ext_pillar'] -%}
  1131. - {{ name }}
  1132. {% endfor -%}
  1133. {%- else %}
  1134. #on_demand_ext_pillar:
  1135. # - libvirt
  1136. # - virtkey
  1137. {%- endif %}
  1138. # The pillar_gitfs_ssl_verify option specifies whether to ignore ssl certificate
  1139. # errors when contacting the pillar gitfs backend. You might want to set this to
  1140. # false if you're using a git backend that uses a self-signed certificate but
  1141. # keep in mind that setting this flag to anything other than the default of True
  1142. # is a security concern, you may want to try using the ssh transport.
  1143. {{ get_config('pillar_gitfs_ssl_verify', 'True') }}
  1144. # The pillar_opts option adds the master configuration file data to a dict in
  1145. # the pillar called "master". This is used to set simple configurations in the
  1146. # master config file that can then be used on minions.
  1147. {{ get_config('pillar_opts', 'False') }}
  1148. # The pillar_safe_render_error option prevents the master from passing pillar
  1149. # render errors to the minion. This is set on by default because the error could
  1150. # contain templating data which would give that minion information it shouldn't
  1151. # have, like a password! When set true the error message will only show:
  1152. # Rendering SLS 'my.sls' failed. Please see master log for details.
  1153. {{ get_config('pillar_safe_render_error', 'True') }}
  1154. # The pillar_source_merging_strategy option allows you to configure merging strategy
  1155. # between different sources. It accepts five values: none, recurse, aggregate, overwrite,
  1156. # or smart. None will not do any merging at all. Recurse will merge recursively mapping of data.
  1157. # Aggregate instructs aggregation of elements between sources that use the #!yamlex renderer. Overwrite
  1158. # will overwrite elements according the order in which they are processed. This is
  1159. # behavior of the 2014.1 branch and earlier. Smart guesses the best strategy based
  1160. # on the "renderer" setting and is the default value.
  1161. {{ get_config('pillar_source_merging_strategy', 'smart') }}
  1162. # Recursively merge lists by aggregating them instead of replacing them.
  1163. {{ get_config('pillar_merge_lists', 'False') }}
  1164. # Set this option to 'True' to force a 'KeyError' to be raised whenever an
  1165. # attempt to retrieve a named value from pillar fails. When this option is set
  1166. # to 'False', the failed attempt returns an empty string. Default is 'False'.
  1167. {{ get_config('pillar_raise_on_missing', 'False') }}
  1168. # Git External Pillar (git_pillar) Configuration Options
  1169. #
  1170. # Specify the provider to be used for git_pillar. Must be either pygit2 or
  1171. # gitpython. If unset, then both will be tried in that same order, and the
  1172. # first one with a compatible version installed will be the provider that
  1173. # is used.
  1174. {{ get_config('git_pillar_provider', 'pygit2') }}
  1175. # If the desired branch matches this value, and the environment is omitted
  1176. # from the git_pillar configuration, then the environment for that git_pillar
  1177. # remote will be base.
  1178. {{ get_config('git_pillar_base', 'master') }}
  1179. # If the branch is omitted from a git_pillar remote, then this branch will
  1180. # be used instead.
  1181. {{ get_config('git_pillar_branch', 'master') }}
  1182. # Environment to use for git_pillar remotes. This is normally derived from
  1183. # the branch/tag (or from a per-remote env parameter), but if set this will
  1184. # override the process of deriving the env from the branch/tag name.
  1185. {{ get_config('git_pillar_env', '') }}
  1186. # Path relative to the root of the repository where the git_pillar top file
  1187. # and SLS files are located.
  1188. {{ get_config('git_pillar_root', 'pillar') }}
  1189. # Specifies whether or not to ignore SSL certificate errors when contacting
  1190. # the remote repository.
  1191. {{ get_config('git_pillar_ssl_verify', True) }}
  1192. # When set to False, if there is an update/checkout lock for a git_pillar
  1193. # remote and the pid written to it is not running on the master, the lock
  1194. # file will be automatically cleared and a new lock will be obtained.
  1195. {{ get_config('git_pillar_global_lock', False) }}
  1196. # Git External Pillar Authentication Options
  1197. #
  1198. # Along with git_pillar_password, is used to authenticate to HTTPS remotes.
  1199. {{ get_config('git_pillar_user', '') }}
  1200. # Along with git_pillar_user, is used to authenticate to HTTPS remotes.
  1201. # This parameter is not required if the repository does not use authentication.
  1202. {{ get_config('git_pillar_password', '') }}
  1203. # By default, Salt will not authenticate to an HTTP (non-HTTPS) remote.
  1204. # This parameter enables authentication over HTTP.
  1205. {{ get_config('git_pillar_insecure_auth', False) }}
  1206. # Along with git_pillar_privkey (and optionally git_pillar_passphrase),
  1207. # is used to authenticate to SSH remotes.
  1208. {{ get_config('git_pillar_pubkey', '') }}
  1209. # Along with git_pillar_pubkey (and optionally git_pillar_passphrase),
  1210. # is used to authenticate to SSH remotes.
  1211. {{ get_config('git_pillar_privkey', '') }}
  1212. # This parameter is optional, required only when the SSH key being used
  1213. # to authenticate is protected by a passphrase.
  1214. {{ get_config('git_pillar_passphrase', '') }}
  1215. # A master can cache pillars locally to bypass the expense of having to render them
  1216. # for each minion on every request. This feature should only be enabled in cases
  1217. # where pillar rendering time is known to be unsatisfactory and any attendant security
  1218. # concerns about storing pillars in a master cache have been addressed.
  1219. #
  1220. # When enabling this feature, be certain to read through the additional ``pillar_cache_*``
  1221. # configuration options to fully understand the tunable parameters and their implications.
  1222. #
  1223. # Note: setting ``pillar_cache: True`` has no effect on targeting Minions with Pillars.
  1224. # See https://docs.saltstack.com/en/latest/topics/targeting/pillar.html
  1225. {{ get_config('pillar_cache', 'False') }}
  1226. # If and only if a master has set ``pillar_cache: True``, the cache TTL controls the amount
  1227. # of time, in seconds, before the cache is considered invalid by a master and a fresh
  1228. # pillar is recompiled and stored.
  1229. {{ get_config('pillar_cache_ttl', '3600') }}
  1230. # If and only if a master has set `pillar_cache: True`, one of several storage providers
  1231. # can be utililzed.
  1232. #
  1233. # `disk`: The default storage backend. This caches rendered pillars to the master cache.
  1234. # Rendered pillars are serialized and deserialized as msgpack structures for speed.
  1235. # Note that pillars are stored UNENCRYPTED. Ensure that the master cache
  1236. # has permissions set appropriately. (Same defaults are provided.)
  1237. #
  1238. # memory: [EXPERIMENTAL] An optional backend for pillar caches which uses a pure-Python
  1239. # in-memory data structure for maximal performance. There are several caveats,
  1240. # however. First, because each master worker contains its own in-memory cache,
  1241. # there is no guarantee of cache consistency between minion requests. This
  1242. # works best in situations where the pillar rarely if ever changes. Secondly,
  1243. # and perhaps more importantly, this means that unencrypted pillars will
  1244. # be accessible to any process which can examine the memory of the ``salt-master``!
  1245. # This may represent a substantial security risk.
  1246. #
  1247. {{ get_config('pillar_cache_backend', 'disk') }}
  1248. ##### Syndic settings #####
  1249. ##########################################
  1250. # The Salt syndic is used to pass commands through a master from a higher
  1251. # master. Using the syndic is simple. If this is a master that will have
  1252. # syndic servers(s) below it, then set the "order_masters" setting to True.
  1253. #
  1254. # If this is a master that will be running a syndic daemon for passthrough, then
  1255. # the "syndic_master" setting needs to be set to the location of the master server
  1256. # to receive commands from.
  1257. # Set the order_masters setting to True if this master will command lower
  1258. # masters' syndic interfaces.
  1259. {{ get_config('order_masters', 'False') }}
  1260. # If this master will be running a salt syndic daemon, syndic_master tells
  1261. # this master where to receive commands from.
  1262. {{ get_config('syndic_master', 'masterofmasters') }}
  1263. # This is the 'ret_port' of the MasterOfMaster:
  1264. {{ get_config('syndic_master_port', '4506') }}
  1265. # PID file of the syndic daemon:
  1266. {{ get_config('syndic_pidfile', '/var/run/salt-syndic.pid') }}
  1267. # LOG file of the syndic daemon:
  1268. {{ get_config('syndic_log_file', '/var/log/salt/syndic') }}
  1269. # The user under which the salt syndic will run.
  1270. {{ get_config('syndic_user', 'root') }}
  1271. # The behaviour of the multi-syndic when connection to a master of masters failed.
  1272. # Can specify ``random`` (default) or ``ordered``. If set to ``random``, masters
  1273. # will be iterated in random order. If ``ordered`` is specified, the configured
  1274. # order will be used.
  1275. {{ get_config('syndic_failover', 'random') }}
  1276. # The number of seconds for the salt client to wait for additional syndics to
  1277. # check in with their lists of expected minions before giving up.
  1278. {{ get_config('syndic_wait', '5') }}
  1279. ##### Peer Publish settings #####
  1280. ##########################################
  1281. # Salt minions can send commands to other minions, but only if the minion is
  1282. # allowed to. By default "Peer Publication" is disabled, and when enabled it
  1283. # is enabled for specific minions and specific commands. This allows secure
  1284. # compartmentalization of commands based on individual minions.
  1285. # The configuration uses regular expressions to match minions and then a list
  1286. # of regular expressions to match functions. The following will allow the
  1287. # minion authenticated as foo.example.com to execute functions from the test
  1288. # and pkg modules.
  1289. #peer:
  1290. # foo.example.com:
  1291. # - test.*
  1292. # - pkg.*
  1293. #
  1294. # This will allow all minions to execute all commands:
  1295. #peer:
  1296. # .*:
  1297. # - .*
  1298. #
  1299. # This is not recommended, since it would allow anyone who gets root on any
  1300. # single minion to instantly have root on all of the minions!
  1301. {% if 'peer' in cfg_master %}
  1302. {%- do default_keys.append('peer') %}
  1303. peer:
  1304. {% for name, roots in cfg_master['peer'].items() %}
  1305. {{ name }}:
  1306. {% for mod in roots %}
  1307. - {{ mod }}
  1308. {% endfor %}
  1309. {% endfor %}
  1310. {% elif 'peer' in cfg_salt %}
  1311. peer:
  1312. {% for name, roots in cfg_salt['peer'].items() %}
  1313. {{ name }}:
  1314. {% for mod in roots %}
  1315. - {{ mod }}
  1316. {% endfor %}
  1317. {% endfor %}
  1318. {% endif %}
  1319. # Minions can also be allowed to execute runners from the salt master.
  1320. # Since executing a runner from the minion could be considered a security risk,
  1321. # it needs to be enabled. This setting functions just like the peer setting
  1322. # except that it opens up runners instead of module functions.
  1323. #
  1324. # All peer runner support is turned off by default and must be enabled before
  1325. # using. This will enable all peer runners for all minions:
  1326. #peer_run:
  1327. # .*:
  1328. # - .*
  1329. #
  1330. # To enable just the manage.up runner for the minion foo.example.com:
  1331. #peer_run:
  1332. # foo.example.com:
  1333. # - manage.up
  1334. {% if 'peer_run' in cfg_master %}
  1335. {%- do default_keys.append('peer_run') %}
  1336. peer_run:
  1337. {%- for name, roots in cfg_master['peer_run'].items() %}
  1338. {{ name }}:
  1339. {%- for mod in roots %}
  1340. - {{ mod }}
  1341. {%- endfor %}
  1342. {%- endfor %}
  1343. {%- elif 'peer_run' in cfg_salt %}
  1344. peer_run:
  1345. {%- for name, roots in cfg_salt['peer_run'].items() %}
  1346. {{ name }}:
  1347. {%- for mod in roots %}
  1348. - {{ mod }}
  1349. {%- endfor %}
  1350. {%- endfor %}
  1351. {%- endif %}
  1352. ##### Mine settings #####
  1353. #####################################
  1354. # Restrict mine.get access from minions. By default any minion has a full access
  1355. # to get all mine data from master cache. In acl definion below, only pcre matches
  1356. # are allowed.
  1357. # mine_get:
  1358. # .*:
  1359. # - .*
  1360. #
  1361. # The example below enables minion foo.example.com to get 'network.interfaces' mine
  1362. # data only, minions web* to get all network.* and disk.* mine data and all other
  1363. # minions won't get any mine data.
  1364. {% if 'mine_get' in cfg_master -%}
  1365. {%- do default_keys.append('mine_get') %}
  1366. mine_get:
  1367. {%- for minion, data in cfg_master['mine_get']|dictsort %}
  1368. {{ minion }}:
  1369. {%- for command in data %}
  1370. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  1371. {%- endfor -%}
  1372. {%- endfor -%}
  1373. {% elif 'mine_get' in cfg_salt -%}
  1374. mine_get:
  1375. {%- for minion, data in cfg_salt['mine_get']|dictsort %}
  1376. {{ minion }}:
  1377. {%- for command in data %}
  1378. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  1379. {%- endfor -%}
  1380. {%- endfor -%}
  1381. {% else -%}
  1382. # mine_get:
  1383. # foo.example.com:
  1384. # - network.interfaces
  1385. # web.*:
  1386. # - network.*
  1387. # - disk.*
  1388. {%- endif %}
  1389. ##### Logging settings #####
  1390. ##########################################
  1391. # The location of the master log file
  1392. # The master log can be sent to a regular file, local path name, or network
  1393. # location. Remote logging works best when configured to use rsyslogd(8) (e.g.:
  1394. # ``file:///dev/log``), with rsyslogd(8) configured for network logging. The URI
  1395. # format is: <file|udp|tcp>://<host|socketpath>:<port-if-required>/<log-facility>
  1396. #log_file: /var/log/salt/master
  1397. #log_file: file:///dev/log
  1398. #log_file: udp://loghost:10514
  1399. {{ get_config('log_file', '/var/log/salt/master') }}
  1400. {{ get_config('key_logfile', '/var/log/salt/key') }}
  1401. # The level of messages to send to the console.
  1402. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
  1403. #
  1404. # The following log levels are considered INSECURE and may log sensitive data:
  1405. # ['garbage', 'trace', 'debug']
  1406. #
  1407. {{ get_config('log_level', 'warning') }}
  1408. # The level of messages to send to the log file.
  1409. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
  1410. # If using 'log_granular_levels' this must be set to the highest desired level.
  1411. {{ get_config('log_level_logfile', 'warning') }}
  1412. # The date and time format used in log messages. Allowed date/time formating
  1413. # can be seen here: http://docs.python.org/library/time.html#time.strftime
  1414. {{ get_config('log_datefmt', "'%H:%M:%S'") }}
  1415. {{ get_config('log_datefmt_logfile', "'%Y-%m-%d %H:%M:%S'") }}
  1416. # The format of the console logging messages. Allowed formatting options can
  1417. # be seen here: http://docs.python.org/library/logging.html#logrecord-attributes
  1418. #
  1419. # Console log colors are specified by these additional formatters:
  1420. #
  1421. # %(colorlevel)s
  1422. # %(colorname)s
  1423. # %(colorprocess)s
  1424. # %(colormsg)s
  1425. #
  1426. # Since it is desirable to include the surrounding brackets, '[' and ']', in
  1427. # the coloring of the messages, these color formatters also include padding as
  1428. # well. Color LogRecord attributes are only available for console logging.
  1429. #
  1430. #log_fmt_console "%(colorlevel)s %(colormsg)s"
  1431. {{ get_config('log_fmt_console', "'[%(levelname)-8s] %(message)s'") }}
  1432. {{ get_config('log_fmt_logfile', "'%(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s'") }}
  1433. # This can be used to control logging levels more specificically. This
  1434. # example sets the main salt library at the 'warning' level, but sets
  1435. # 'salt.modules' to log at the 'debug' level:
  1436. # log_granular_levels:
  1437. # 'salt': 'warning'
  1438. # 'salt.modules': 'debug'
  1439. #
  1440. {% if 'log_granular_levels' in cfg_master %}
  1441. {%- do default_keys.append('log_granular_levels') %}
  1442. log_granular_levels:
  1443. {% for name, lvl in cfg_master['log_granular_levels'].items() %}
  1444. {{ name }}: {{ lvl }}
  1445. {% endfor %}
  1446. {% elif 'log_granular_levels' in cfg_salt %}
  1447. log_granular_levels:
  1448. {% for name, lvl in cfg_salt['log_granular_levels'].items() %}
  1449. {{ name }}: {{ lvl }}
  1450. {% endfor %}
  1451. {% else %}
  1452. #log_granular_levels: {}
  1453. {% endif %}
  1454. ##### Node Groups ######
  1455. ##########################################
  1456. # Node groups allow for logical groupings of minion nodes. A group consists of
  1457. # a group name and a compound target. Nodgroups can reference other nodegroups
  1458. # with 'N@' classifier. Ensure that you do not have circular references.
  1459. #
  1460. #nodegroups:
  1461. # group1: 'L@foo.domain.com,bar.domain.com,baz.domain.com or bl*.domain.com'
  1462. # group2: 'G@os:Debian and foo.domain.com'
  1463. # group3: 'G@os:Debian and N@group1'
  1464. # group4:
  1465. # - 'G@foo:bar'
  1466. # - 'or'
  1467. # - 'G@foo:baz'
  1468. {%- if 'nodegroups' in cfg_master %}
  1469. {%- do default_keys.append('nodegroups') %}
  1470. nodegroups:
  1471. {%- for name, lvl in cfg_master['nodegroups'].items() %}
  1472. {{ name }}: {{ lvl }}
  1473. {%- endfor %}
  1474. {%- elif 'nodegroups' in cfg_salt %}
  1475. nodegroups:
  1476. {%- for name, lvl in cfg_salt['nodegroups'].items() %}
  1477. {{ name }}: {{ lvl }}
  1478. {%- endfor %}
  1479. {%- endif %}
  1480. ##### Range Cluster settings #####
  1481. ##########################################
  1482. # The range server (and optional port) that serves your cluster information
  1483. # https://github.com/ytoolshed/range/wiki/%22yamlfile%22-module-file-spec
  1484. #
  1485. {{ get_config('range_server', 'range:80') }}
  1486. ##### Windows Software Repo settings #####
  1487. ###########################################
  1488. # Specify the provider to be used for git_pillar. Must be either pygit2 or
  1489. # gitpython. If unset, then both will be tried in that same order, and the
  1490. # first one with a compatible version installed will be the provider that
  1491. # is used.
  1492. {{ get_config('winrepo_provider', 'pygit2') }}
  1493. # Repo settings for 2015.8+ master used with 2015.8+ Windows minions
  1494. #
  1495. # Location of the repo on the master:
  1496. {{ get_config('winrepo_dir_ng', '/srv/salt/win/repo-ng') }}
  1497. # List of git repositories to include with the local repo:
  1498. {% if 'winrepo_remotes_ng' in cfg_master %}
  1499. {%- do default_keys.append('winrepo_remotes_ng') %}
  1500. winrepo_remotes_ng:
  1501. {% for repo in cfg_master['winrepo_remotes_ng'] %}
  1502. - {{ repo }}
  1503. {% endfor %}
  1504. {% elif 'winrepo_remotes_ng' in cfg_salt %}
  1505. winrepo_remotes_ng:
  1506. {% for repo in cfg_salt['winrepo_remotes_ng'] %}
  1507. - {{ repo }}
  1508. {% endfor %}
  1509. {% else %}
  1510. #winrepo_remotes_ng:
  1511. # - 'https://github.com/saltstack/salt-winrepo-ng.git'
  1512. {% endif %}
  1513. # Repo settings for 2015.8+ master used with pre-2015.8 Windows minions
  1514. #
  1515. # Location of the repo on the master:
  1516. {{ get_config('winrepo_dir', '/srv/salt/win/repo') }}
  1517. # Location of the master's repo cache file:
  1518. {{ get_config('winrepo_cachefile', 'winrepo.p') }}
  1519. # List of git repositories to include with the local repo:
  1520. {% if 'winrepo_remotes' in cfg_master %}
  1521. {%- do default_keys.append('winrepo_remotes') %}
  1522. winrepo_remotes:
  1523. {% for repo in cfg_master['winrepo_remotes'] %}
  1524. - {{ repo }}
  1525. {% endfor %}
  1526. {% elif 'winrepo_remotes' in cfg_salt %}
  1527. winrepo_remotes:
  1528. {% for repo in cfg_salt['winrepo_remotes'] %}
  1529. - {{ repo }}
  1530. {% endfor %}
  1531. {% else %}
  1532. #winrepo_remotes:
  1533. # - 'https://github.com/saltstack/salt-winrepo.git'
  1534. {% endif %}
  1535. ##### Windows Software Repo settings - Pre 2015.8 #####
  1536. ########################################################
  1537. # Legacy repo settings for pre-2015.8 Windows minions.
  1538. #
  1539. # Location of the repo on the master:
  1540. {{ get_config('win_repo', '/srv/salt/win/repo') }}
  1541. # Location of the master's repo cache file:
  1542. {{ get_config('win_repo_mastercachefile', '/srv/salt/win/repo/winrepo.p') }}
  1543. # List of git repositories to include with the local repo:
  1544. {% if 'win_gitrepos' in cfg_master %}
  1545. {%- do default_keys.append('win_gitrepos') %}
  1546. win_gitrepos:
  1547. {% for repo in cfg_master['win_gitrepos'] %}
  1548. - {{ repo }}
  1549. {% endfor %}
  1550. {% elif 'win_gitrepos' in cfg_salt %}
  1551. win_gitrepos:
  1552. {% for repo in cfg_salt['win_gitrepos'] %}
  1553. - {{ repo }}
  1554. {% endfor %}
  1555. {% else %}
  1556. #winrepo_remotes:
  1557. # - 'https://github.com/saltstack/salt-winrepo.git'
  1558. {% endif %}
  1559. ##### Returner settings ######
  1560. ############################################
  1561. # Which returner(s) will be used for minion's result:
  1562. #return: mysql
  1563. {{ get_config('return', '')}}
  1564. ###### Miscellaneous settings ######
  1565. ############################################
  1566. # Default match type for filtering events tags: startswith, endswith, find, regex, fnmatch
  1567. {{ get_config('event_match_type', 'startswith') }}
  1568. # Save runner returns to the job cache
  1569. {{ get_config('runner_returns', 'True') }}
  1570. # Permanently include any available Python 3rd party modules into Salt Thin
  1571. # when they are generated for Salt-SSH or other purposes.
  1572. # The modules should be named by the names they are actually imported inside the Python.
  1573. # The value of the parameters can be either one module or a comma separated list of them.
  1574. {%- if 'thin_extra_mods' in cfg_master %}
  1575. {{ get_config('thin_extra_mods', '') }}
  1576. {%- else %}
  1577. #thin_extra_mods: foo,bar
  1578. {%- endif %}
  1579. {%- if 'halite' in cfg_master %}
  1580. {%- do default_keys.append('halite') %}
  1581. ##### Halite #####
  1582. ##########################################
  1583. halite:
  1584. {%- for name, value in cfg_master['halite'].items() %}
  1585. {{ name }}: {{ value }}
  1586. {%- endfor %}
  1587. {%- endif %}
  1588. {%- if 'rest_cherrypy' in cfg_master %}
  1589. {%- do default_keys.append('rest_cherrypy') %}
  1590. ##### rest_cherrypy #####
  1591. ##########################################
  1592. rest_cherrypy:
  1593. {%- for name, value in cfg_master['rest_cherrypy'].items() %}
  1594. {{ name }}: {{ value }}
  1595. {%- endfor %}
  1596. {%- endif %}
  1597. {%- if 'rest_tornado' in cfg_master %}
  1598. {%- do default_keys.append('rest_tornado') %}
  1599. ##### rest_tornado #####
  1600. ###########################################
  1601. rest_tornado:
  1602. {%- for name, value in cfg_master['rest_tornado'].items() %}
  1603. {{ name }}: {{ value }}
  1604. {%- endfor %}
  1605. {%- endif %}
  1606. {%- if 'presence_events' in cfg_master %}
  1607. ##### presence events #####
  1608. ##########################################
  1609. {{ get_config('presence_events', 'False') }}
  1610. {%- endif %}
  1611. {%- if 'consul_config' in cfg_master %}
  1612. {%- do default_keys.append('consul_config') %}
  1613. ##### consul_config #####
  1614. ##########################################
  1615. consul_config:
  1616. {%- for name, value in cfg_master['consul_config'].items() %}
  1617. {{ name }}: {{ value }}
  1618. {%- endfor %}
  1619. {%- endif %}
  1620. {% if 'mongo' in cfg_master -%}
  1621. {%- do default_keys.append('mongo') %}
  1622. ##### mongodb connection settings #####
  1623. ##########################################
  1624. {%- for name, value in cfg_master['mongo'].items() %}
  1625. mongo.{{ name }}: {{ value }}
  1626. {%- endfor %}
  1627. {% if 'alternative.mongo' in cfg_master -%}
  1628. {%- do default_keys.append('alternative.mongo') %}
  1629. {%- for name, value in cfg_master['alternative.mongo'].items() %}
  1630. alternative.mongo.{{ name }}: {{ value }}
  1631. {%- endfor %}
  1632. {% endif %}
  1633. {%- endif %}
  1634. {%- for configname in cfg_master|sort %}
  1635. {%- if configname not in reserved_keys and configname not in default_keys %}
  1636. {{ configname }}:
  1637. {{ cfg_master[configname]| yaml(False) | indent(2) }}
  1638. {%- endif %}
  1639. {%- endfor %}