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.

1748 lines
66KB

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