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.

1839 lines
69KB

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