Saltstack Official Salt Formula
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

f_defaults.conf 57KB

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