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.

1851 lines
70KB

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