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

пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751
  1. # This file managed by Salt, do not edit by hand!!
  2. # Based on salt version 2015.8.7 default config
  3. #
  4. {% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs'] -%}
  5. {% set cfg_salt = pillar.get('salt', {}) -%}
  6. {% set cfg_minion = cfg_salt.get('minion', {}) -%}
  7. {%- macro get_config(configname, default_value) -%}
  8. {%- if configname in cfg_minion -%}
  9. {{ configname }}: {{ cfg_minion[configname] }}
  10. {%- elif configname in cfg_salt and configname not in reserved_keys -%}
  11. {{ configname }}: {{ cfg_salt[configname] }}
  12. {%- else -%}
  13. #{{ configname }}: {{ default_value }}
  14. {%- endif -%}
  15. {%- endmacro -%}
  16. {%- from 'salt/formulas.jinja' import file_roots, formulas with context -%}
  17. ##### Primary configuration settings #####
  18. ##########################################
  19. # This configuration file is used to manage the behavior of the Salt Minion.
  20. # With the exception of the location of the Salt Master Server, values that are
  21. # commented out but have an empty line after the comment are defaults that need
  22. # not be set in the config. If there is no blank line after the comment, the
  23. # value is presented as an example and is not the default.
  24. # Per default the minion will automatically include all config files
  25. # from minion.d/*.conf (minion.d is a directory in the same directory
  26. # as the main minion config file).
  27. {{ get_config('default_include', 'minion.d/*.conf') }}
  28. # Set the location of the salt master server. If the master server cannot be
  29. # resolved, then the minion will fail to start.
  30. {%- if 'master' in cfg_minion and cfg_minion['master'] is not string %}
  31. master:
  32. {% for name in cfg_minion['master'] -%}
  33. - {{ name }}
  34. {% endfor -%}
  35. {%- else %}
  36. {{ get_config('master', 'salt') }}
  37. {%- endif %}
  38. # If multiple masters are specified in the 'master' setting, the default behavior
  39. # is to always try to connect to them in the order they are listed. If random_master is
  40. # set to True, the order will be randomized instead. This can be helpful in distributing
  41. # the load of many minions executing salt-call requests, for example, from a cron job.
  42. # If only one master is listed, this setting is ignored and a warning will be logged.
  43. # NOTE: If master_type is set to failover, use master_shuffle instead.
  44. {{ get_config('random_master', 'False') }}
  45. # Use if master_type is set to failover.
  46. {{ get_config('master_shuffle', 'False') }}
  47. # Minions can connect to multiple masters simultaneously (all masters
  48. # are "hot"), or can be configured to failover if a master becomes
  49. # unavailable. Multiple hot masters are configured by setting this
  50. # value to "str". Failover masters can be requested by setting
  51. # to "failover". MAKE SURE TO SET master_alive_interval if you are
  52. # using failover.
  53. {{ get_config('master_type', 'str') }}
  54. # verify_master_pubkey_sign
  55. {{ get_config('verify_master_pubkey_sign', 'False') }}
  56. # Poll interval in seconds for checking if the master is still there. Only
  57. # respected if master_type above is "failover". To disable the interval entirely,
  58. # set the value to -1. (This may be necessary on machines which have high numbers
  59. # of TCP connections, such as load balancers.)
  60. {{ get_config('master_alive_interval', '30') }}
  61. # Set whether the minion should connect to the master via IPv6:
  62. {{ get_config('ipv6', 'False') }}
  63. # Set the number of seconds to wait before attempting to resolve
  64. # the master hostname if name resolution fails. Defaults to 30 seconds.
  65. # Set to zero if the minion should shutdown and not retry.
  66. {{ get_config('retry_dns', '30') }}
  67. # Set the port used by the master reply and authentication server.
  68. {{ get_config('master_port', '4506') }}
  69. # The user to run salt.
  70. {{ get_config('user', 'root') }}
  71. # Setting sudo_user will cause salt to run all execution modules under an sudo
  72. # to the user given in sudo_user. The user under which the salt minion process
  73. # itself runs will still be that provided in the user config above, but all
  74. # execution modules run by the minion will be rerouted through sudo.
  75. {{ get_config('sudo_user', 'saltdev') }}
  76. # Specify the location of the daemon process ID file.
  77. {{ get_config('pidfile', '/var/run/salt-minion.pid') }}
  78. # The root directory prepended to these options: pki_dir, cachedir, log_file,
  79. # sock_dir, pidfile.
  80. {{ get_config('root_dir', '/') }}
  81. # The directory to store the pki information in
  82. {{ get_config('pki_dir', '/etc/salt/pki/minion') }}
  83. # Explicitly declare the id for this minion to use, if left commented the id
  84. # will be the hostname as returned by the python call: socket.getfqdn()
  85. # Since salt uses detached ids it is possible to run multiple minions on the
  86. # same machine but with different ids, this can be useful for salt compute
  87. # clusters.
  88. {% if 'id' in cfg_minion -%}
  89. id: {{ cfg_minion['id'] }}
  90. {% else -%}
  91. #id:
  92. {%- endif %}
  93. # Append a domain to a hostname in the event that it does not exist. This is
  94. # useful for systems where socket.getfqdn() does not actually result in a
  95. # FQDN (for instance, Solaris).
  96. {{ get_config('append_domain', '') }}
  97. # Custom static grains for this minion can be specified here and used in SLS
  98. # files just like all other grains. This example sets 4 custom grains, with
  99. # the 'roles' grain having two values that can be matched against.
  100. #grains:
  101. # roles:
  102. # - webserver
  103. # - memcache
  104. # deployment: datacenter4
  105. # cabinet: 13
  106. # cab_u: 14-15
  107. {{ get_config('grains', '{}') }}
  108. # Where cache data goes.
  109. # This data may contain sensitive data and should be protected accordingly.
  110. {{ get_config('cachedir', '/var/cache/salt/minion') }}
  111. # Verify and set permissions on configuration directories at startup.
  112. {{ get_config('verify_env', 'True') }}
  113. # The minion can locally cache the return data from jobs sent to it, this
  114. # can be a good way to keep track of jobs the minion has executed
  115. # (on the minion side). By default this feature is disabled, to enable, set
  116. # cache_jobs to True.
  117. {{ get_config('cache_jobs', 'False') }}
  118. # Set the directory used to hold unix sockets.
  119. {{ get_config('sock_dir', '/var/run/salt/minion') }}
  120. # Set the default outputter used by the salt-call command. The default is
  121. # "nested".
  122. {{ get_config('output', 'nested') }}
  123. # By default output is colored. To disable colored output, set the color value
  124. # to False.
  125. {{ get_config('color', 'True') }}
  126. # Do not strip off the colored output from nested results and state outputs
  127. # (true by default).
  128. {{ get_config('strip_colors', 'False') }}
  129. # Backup files that are replaced by file.managed and file.recurse under
  130. # 'cachedir'/file_backups relative to their original location and appended
  131. # with a timestamp. The only valid setting is "minion". Disabled by default.
  132. #
  133. # Alternatively this can be specified for each file in state files:
  134. # /etc/ssh/sshd_config:
  135. # file.managed:
  136. # - source: salt://ssh/sshd_config
  137. # - backup: minion
  138. #
  139. {{ get_config('backup_mode', 'minion') }}
  140. # When waiting for a master to accept the minion's public key, salt will
  141. # continuously attempt to reconnect until successful. This is the time, in
  142. # seconds, between those reconnection attempts.
  143. {{ get_config('acceptance_wait_time', '10') }}
  144. # If this is nonzero, the time between reconnection attempts will increase by
  145. # acceptance_wait_time seconds per iteration, up to this maximum. If this is
  146. # set to zero, the time between reconnection attempts will stay constant.
  147. {{ get_config('acceptance_wait_time_max', '0') }}
  148. # If the master rejects the minion's public key, retry instead of exiting.
  149. # Rejected keys will be handled the same as waiting on acceptance.
  150. {{ get_config('rejected_retry', 'False') }}
  151. # When the master key changes, the minion will try to re-auth itself to receive
  152. # the new master key. In larger environments this can cause a SYN flood on the
  153. # master because all minions try to re-auth immediately. To prevent this and
  154. # have a minion wait for a random amount of time, use this optional parameter.
  155. # The wait-time will be a random number of seconds between 0 and the defined value.
  156. {{ get_config('random_reauth_delay', '60') }}
  157. # When waiting for a master to accept the minion's public key, salt will
  158. # continuously attempt to reconnect until successful. This is the timeout value,
  159. # in seconds, for each individual attempt. After this timeout expires, the minion
  160. # will wait for acceptance_wait_time seconds before trying again. Unless your master
  161. # is under unusually heavy load, this should be left at the default.
  162. {{ get_config('auth_timeout', '60') }}
  163. # Number of consecutive SaltReqTimeoutError that are acceptable when trying to
  164. # authenticate.
  165. {{ get_config('auth_tries', '7') }}
  166. # If authentication fails due to SaltReqTimeoutError during a ping_interval,
  167. # cause sub minion process to restart.
  168. {{ get_config('auth_safemode', 'False') }}
  169. # Ping Master to ensure connection is alive (minutes).
  170. {{ get_config('ping_interval', '0') }}
  171. # To auto recover minions if master changes IP address (DDNS)
  172. # auth_tries: 10
  173. # auth_safemode: False
  174. # ping_interval: 90
  175. #
  176. # Minions won't know master is missing until a ping fails. After the ping fail,
  177. # the minion will attempt authentication and likely fails out and cause a restart.
  178. # When the minion restarts it will resolve the masters IP and attempt to reconnect.
  179. # If you don't have any problems with syn-floods, don't bother with the
  180. # three recon_* settings described below, just leave the defaults!
  181. #
  182. # The ZeroMQ pull-socket that binds to the masters publishing interface tries
  183. # to reconnect immediately, if the socket is disconnected (for example if
  184. # the master processes are restarted). In large setups this will have all
  185. # minions reconnect immediately which might flood the master (the ZeroMQ-default
  186. # is usually a 100ms delay). To prevent this, these three recon_* settings
  187. # can be used.
  188. # recon_default: the interval in milliseconds that the socket should wait before
  189. # trying to reconnect to the master (1000ms = 1 second)
  190. #
  191. # recon_max: the maximum time a socket should wait. each interval the time to wait
  192. # is calculated by doubling the previous time. if recon_max is reached,
  193. # it starts again at recon_default. Short example:
  194. #
  195. # reconnect 1: the socket will wait 'recon_default' milliseconds
  196. # reconnect 2: 'recon_default' * 2
  197. # reconnect 3: ('recon_default' * 2) * 2
  198. # reconnect 4: value from previous interval * 2
  199. # reconnect 5: value from previous interval * 2
  200. # reconnect x: if value >= recon_max, it starts again with recon_default
  201. #
  202. # recon_randomize: generate a random wait time on minion start. The wait time will
  203. # be a random value between recon_default and recon_default +
  204. # recon_max. Having all minions reconnect with the same recon_default
  205. # and recon_max value kind of defeats the purpose of being able to
  206. # change these settings. If all minions have the same values and your
  207. # setup is quite large (several thousand minions), they will still
  208. # flood the master. The desired behavior is to have timeframe within
  209. # all minions try to reconnect.
  210. #
  211. # Example on how to use these settings. The goal: have all minions reconnect within a
  212. # 60 second timeframe on a disconnect.
  213. # recon_default: 1000
  214. # recon_max: 59000
  215. # recon_randomize: True
  216. #
  217. # Each minion will have a randomized reconnect value between 'recon_default'
  218. # and 'recon_default + recon_max', which in this example means between 1000ms
  219. # 60000ms (or between 1 and 60 seconds). The generated random-value will be
  220. # doubled after each attempt to reconnect. Lets say the generated random
  221. # value is 11 seconds (or 11000ms).
  222. # reconnect 1: wait 11 seconds
  223. # reconnect 2: wait 22 seconds
  224. # reconnect 3: wait 33 seconds
  225. # reconnect 4: wait 44 seconds
  226. # reconnect 5: wait 55 seconds
  227. # reconnect 6: wait time is bigger than 60 seconds (recon_default + recon_max)
  228. # reconnect 7: wait 11 seconds
  229. # reconnect 8: wait 22 seconds
  230. # reconnect 9: wait 33 seconds
  231. # reconnect x: etc.
  232. #
  233. # In a setup with ~6000 thousand hosts these settings would average the reconnects
  234. # to about 100 per second and all hosts would be reconnected within 60 seconds.
  235. {{ get_config('recon_default', '100') }}
  236. {{ get_config('recon_max', '5000') }}
  237. {{ get_config('recon_randomize', 'False') }}
  238. # The loop_interval sets how long in seconds the minion will wait between
  239. # evaluating the scheduler and running cleanup tasks. This defaults to a
  240. # sane 60 seconds, but if the minion scheduler needs to be evaluated more
  241. # often lower this value
  242. {{ get_config('loop_interval', '60') }}
  243. # The grains_refresh_every setting allows for a minion to periodically check
  244. # its grains to see if they have changed and, if so, to inform the master
  245. # of the new grains. This operation is moderately expensive, therefore
  246. # care should be taken not to set this value too low.
  247. #
  248. # Note: This value is expressed in __minutes__!
  249. #
  250. # A value of 10 minutes is a reasonable default.
  251. #
  252. # If the value is set to zero, this check is disabled.
  253. {{ get_config('grains_refresh_every', '1') }}
  254. # Cache grains on the minion. Default is False.
  255. {{ get_config('grains_cache', 'False') }}
  256. # Grains cache expiration, in seconds. If the cache file is older than this
  257. # number of seconds then the grains cache will be dumped and fully re-populated
  258. # with fresh data. Defaults to 5 minutes. Will have no effect if 'grains_cache'
  259. # is not enabled.
  260. {{ get_config('grains_cache_expiration', '300') }}
  261. # Windows platforms lack posix IPC and must rely on slower TCP based inter-
  262. # process communications. Set ipc_mode to 'tcp' on such systems
  263. {{ get_config('ipc_mode', 'ipc') }}
  264. # Overwrite the default tcp ports used by the minion when in tcp mode
  265. {{ get_config('tcp_pub_port', '4510') }}
  266. {{ get_config('tcp_pull_port', '4511') }}
  267. # Passing very large events can cause the minion to consume large amounts of
  268. # memory. This value tunes the maximum size of a message allowed onto the
  269. # minion event bus. The value is expressed in bytes.
  270. {{ get_config('max_event_size', '1048576') }}
  271. # To detect failed master(s) and fire events on connect/disconnect, set
  272. # master_alive_interval to the number of seconds to poll the masters for
  273. # connection events.
  274. #
  275. {{ get_config('master_alive_interval', '30') }}
  276. # The minion can include configuration from other files. To enable this,
  277. # pass a list of paths to this option. The paths can be either relative or
  278. # absolute; if relative, they are considered to be relative to the directory
  279. # the main minion configuration file lives in (this file). Paths can make use
  280. # of shell-style globbing. If no files are matched by a path passed to this
  281. # option then the minion will log a warning message.
  282. #
  283. # Include a config file from some other path:
  284. {% if 'include' in cfg_minion -%}
  285. {% if isinstance(cfg_minion['include'], list) -%}
  286. include:
  287. {% for include in cfg_minion['include'] -%}
  288. - {{ include }}
  289. {% endfor -%}
  290. {% else -%}
  291. include: cfg_minion['include']
  292. {% endif -%}
  293. {% elif 'include' in cfg_salt -%}
  294. {% if isinstance(cfg_salt['include'], list) -%}
  295. include:
  296. {% for include in cfg_salt['include'] -%}
  297. - {{ include }}
  298. {% endfor -%}
  299. {% else -%}
  300. include: cfg_salt['include']
  301. {% endif -%}
  302. {% endif -%}
  303. ##### Minion module management #####
  304. ##########################################
  305. # Disable specific modules. This allows the admin to limit the level of
  306. # access the master has to the minion.
  307. {{ get_config('disable_modules', '[cmd,test]') }}
  308. {{ get_config('disable_returners', '[]') }}
  309. # Modules can be loaded from arbitrary paths. This enables the easy deployment
  310. # of third party modules. Modules for returners and minions can be loaded.
  311. # Specify a list of extra directories to search for minion modules and
  312. # returners. These paths must be fully qualified!
  313. {{ get_config('module_dirs', '[]') }}
  314. {{ get_config('returner_dirs', '[]') }}
  315. {{ get_config('states_dirs', '[]') }}
  316. {{ get_config('render_dirs', '[]') }}
  317. {{ get_config('utils_dirs', '[]') }}
  318. # A module provider can be statically overwritten or extended for the minion
  319. # via the providers option, in this case the default module will be
  320. # overwritten by the specified module. In this example the pkg module will
  321. # be provided by the yumpkg5 module instead of the system default.
  322. #providers:
  323. # pkg: yumpkg5
  324. {{ get_config('providers', '{}') }}
  325. # Enable Cython modules searching and loading. (Default: False)
  326. {{ get_config('cython_enable', 'False') }}
  327. # Specify a max size (in bytes) for modules on import. This feature is currently
  328. # only supported on *nix operating systems and requires psutil.
  329. {{ get_config('modules_max_memory', '-1') }}
  330. ##### State Management Settings #####
  331. ###########################################
  332. # The state management system executes all of the state templates on the minion
  333. # to enable more granular control of system state management. The type of
  334. # template and serialization used for state management needs to be configured
  335. # on the minion, the default renderer is yaml_jinja. This is a yaml file
  336. # rendered from a jinja template, the available options are:
  337. # yaml_jinja
  338. # yaml_mako
  339. # yaml_wempy
  340. # json_jinja
  341. # json_mako
  342. # json_wempy
  343. #
  344. {{ get_config('renderer', 'yaml_jinja') }}
  345. # The failhard option tells the minions to stop immediately after the first
  346. # failure detected in the state execution. Defaults to False.
  347. {{ get_config('failhard', 'False') }}
  348. # Reload the modules prior to a highstate run.
  349. {{ get_config('autoload_dynamic_modules', 'True') }}
  350. # clean_dynamic_modules keeps the dynamic modules on the minion in sync with
  351. # the dynamic modules on the master, this means that if a dynamic module is
  352. # not on the master it will be deleted from the minion. By default, this is
  353. # enabled and can be disabled by changing this value to False.
  354. {{ get_config('clean_dynamic_modules', 'True') }}
  355. # Normally, the minion is not isolated to any single environment on the master
  356. # when running states, but the environment can be isolated on the minion side
  357. # by statically setting it. Remember that the recommended way to manage
  358. # environments is to isolate via the top file.
  359. {{ get_config('environment', 'None') }}
  360. # If using the local file directory, then the state top file name needs to be
  361. # defined, by default this is top.sls.
  362. {{ get_config('state_top', 'top.sls') }}
  363. # Run states when the minion daemon starts. To enable, set startup_states to:
  364. # 'highstate' -- Execute state.highstate
  365. # 'sls' -- Read in the sls_list option and execute the named sls files
  366. # 'top' -- Read top_file option and execute based on that file on the Master
  367. {{ get_config('startup_states', "''") }}
  368. # List of states to run when the minion starts up if startup_states is 'sls':
  369. #sls_list:
  370. # - edit.vim
  371. # - hyper
  372. {{ get_config('sls_list', '[]') }}
  373. # Top file to execute if startup_states is 'top':
  374. {{ get_config('top_file', "''") }}
  375. # Automatically aggregate all states that have support for mod_aggregate by
  376. # setting to True. Or pass a list of state module names to automatically
  377. # aggregate just those types.
  378. #
  379. # state_aggregate:
  380. # - pkg
  381. #
  382. #state_aggregate: False
  383. {{ get_config('state_aggregate', '{}') }}
  384. ##### File Directory Settings #####
  385. ##########################################
  386. # The Salt Minion can redirect all file server operations to a local directory,
  387. # this allows for the same state tree that is on the master to be used if
  388. # copied completely onto the minion. This is a literal copy of the settings on
  389. # the master but used to reference a local directory on the minion.
  390. # Set the file client. The client defaults to looking on the master server for
  391. # files, but can be directed to look at the local file directory setting
  392. # defined below by setting it to "local". Setting a local file_client runs the
  393. # minion in masterless mode.
  394. {%- if standalone %}
  395. file_client: local
  396. {%- else %}
  397. {{ get_config('file_client', 'remote') }}
  398. {%- endif %}
  399. # The file directory works on environments passed to the minion, each environment
  400. # can have multiple root directories, the subdirectories in the multiple file
  401. # roots cannot match, otherwise the downloaded files will not be able to be
  402. # reliably ensured. A base environment is required to house the top file.
  403. # Example:
  404. # file_roots:
  405. # base:
  406. # - /srv/salt/
  407. # dev:
  408. # - /srv/salt/dev/services
  409. # - /srv/salt/dev/states
  410. # prod:
  411. # - /srv/salt/prod/services
  412. # - /srv/salt/prod/states
  413. {% if 'file_roots' in cfg_minion -%}
  414. {{ file_roots(cfg_minion['file_roots']) }}
  415. {%- elif 'file_roots' in cfg_salt -%}
  416. {{ file_roots(cfg_salt['file_roots']) }}
  417. {%- elif formulas|length -%}
  418. {{ file_roots({'base': ['/srv/salt']}) }}
  419. {%- endif %}
  420. # By default, the Salt fileserver recurses fully into all defined environments
  421. # to attempt to find files. To limit this behavior so that the fileserver only
  422. # traverses directories with SLS files and special Salt directories like _modules,
  423. # enable the option below. This might be useful for installations where a file root
  424. # has a very large number of files and performance is negatively impacted. Default
  425. # is False.
  426. {{ get_config('fileserver_limit_traversal', 'False') }}
  427. # The hash_type is the hash to use when discovering the hash of a file in
  428. # the local fileserver. The default is md5, but sha1, sha224, sha256, sha384
  429. # and sha512 are also supported.
  430. #
  431. # Warning: Prior to changing this value, the minion should be stopped and all
  432. # Salt caches should be cleared.
  433. {{ get_config('hash_type', 'md5') }}
  434. # gitfs provider
  435. {{ get_config('gitfs_provider', 'pygit2') }}
  436. # gitfs remotes
  437. {% if 'gitfs_remotes' in cfg_minion -%}
  438. gitfs_remotes:
  439. {%- for remote in cfg_minion['gitfs_remotes'] %}
  440. {%- if remote is iterable and remote is not string %}
  441. {%- for repo, children in remote.items() %}
  442. - {{ repo }}:
  443. {%- for child in children %}
  444. {%- for key, value in child.items() %}
  445. - {{ key }}: {{ value }}
  446. {%- endfor -%}
  447. {%- endfor -%}
  448. {%- endfor -%}
  449. {%- else %}
  450. - {{ remote }}
  451. {%- endif -%}
  452. {%- endfor -%}
  453. {%- endif %}
  454. # verify git ssl errors
  455. {{ get_config('gitfs_ssl_verify', 'True') }}
  456. # gitfs root dir
  457. {{ get_config('gitfs_root', 'somefolder/otherfolder') }}
  458. # The Salt pillar is searched for locally if file_client is set to local. If
  459. # this is the case, and pillar data is defined, then the pillar_roots need to
  460. # also be configured on the minion:
  461. {% if 'pillar_roots' in cfg_minion -%}
  462. pillar_roots:
  463. {%- for name, roots in cfg_minion['pillar_roots']|dictsort %}
  464. {{ name }}:
  465. {%- for dir in roots %}
  466. - {{ dir }}
  467. {%- endfor -%}
  468. {%- endfor -%}
  469. {% elif 'pillar_roots' in cfg_salt -%}
  470. pillar_roots:
  471. {%- for name, roots in cfg_salt['pillar_roots']|dictsort %}
  472. {{ name }}:
  473. {%- for dir in roots %}
  474. - {{ dir }}
  475. {%- endfor -%}
  476. {%- endfor -%}
  477. {%- endif %}
  478. ###### Security settings #####
  479. ###########################################
  480. # Enable "open mode", this mode still maintains encryption, but turns off
  481. # authentication, this is only intended for highly secure environments or for
  482. # the situation where your keys end up in a bad state. If you run in open mode
  483. # you do so at your own risk!
  484. {{ get_config('open_mode', 'False') }}
  485. # Enable permissive access to the salt keys. This allows you to run the
  486. # master or minion as root, but have a non-root group be given access to
  487. # your pki_dir. To make the access explicit, root must belong to the group
  488. # you've given access to. This is potentially quite insecure.
  489. {{ get_config('permissive_pki_access', 'False') }}
  490. # The state_verbose and state_output settings can be used to change the way
  491. # state system data is printed to the display. By default all data is printed.
  492. # The state_verbose setting can be set to True or False, when set to False
  493. # all data that has a result of True and no changes will be suppressed.
  494. {{ get_config('state_verbose', 'True') }}
  495. # The state_output setting changes if the output is the full multi line
  496. # output for each changed state if set to 'full', but if set to 'terse'
  497. # the output will be shortened to a single line.
  498. {{ get_config('state_output', 'full') }}
  499. # The state_output_diff setting changes whether or not the output from
  500. # successful states is returned. Useful when even the terse output of these
  501. # states is cluttering the logs. Set it to True to ignore them.
  502. {{ get_config('state_output_diff', 'False') }}
  503. # The state_output_profile setting changes whether profile information
  504. # will be shown for each state run.
  505. {{ get_config('state_output_profile', 'True') }}
  506. # Fingerprint of the master public key to validate the identity of your Salt master
  507. # before the initial key exchange. The master fingerprint can be found by running
  508. # "salt-key -F master" on the Salt master.
  509. {{ get_config('master_finger', "''") }}
  510. ###### Thread settings #####
  511. ###########################################
  512. # Disable multiprocessing support, by default when a minion receives a
  513. # publication a new process is spawned and the command is executed therein.
  514. {{ get_config('multiprocessing', 'True') }}
  515. ##### Logging settings #####
  516. ##########################################
  517. # The location of the minion log file
  518. # The minion log can be sent to a regular file, local path name, or network
  519. # location. Remote logging works best when configured to use rsyslogd(8) (e.g.:
  520. # ``file:///dev/log``), with rsyslogd(8) configured for network logging. The URI
  521. # format is: <file|udp|tcp>://<host|socketpath>:<port-if-required>/<log-facility>
  522. #log_file: /var/log/salt/minion
  523. #log_file: file:///dev/log
  524. #log_file: udp://loghost:10514
  525. #
  526. {{ get_config('log_file', '/var/log/salt/minion') }}
  527. {{ get_config('key_logfile', ' /var/log/salt/key') }}
  528. # The level of messages to send to the console.
  529. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
  530. #
  531. # The following log levels are considered INSECURE and may log sensitive data:
  532. # ['garbage', 'trace', 'debug']
  533. #
  534. # Default: 'warning'
  535. {{ get_config('log_level', 'warning') }}
  536. # The level of messages to send to the log file.
  537. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
  538. # If using 'log_granular_levels' this must be set to the highest desired level.
  539. # Default: 'warning'
  540. {{ get_config('log_level_logfile', '') }}
  541. # The date and time format used in log messages. Allowed date/time formating
  542. # can be seen here: http://docs.python.org/library/time.html#time.strftime
  543. {{ get_config('log_datefmt', "'%H:%M:%S'") }}
  544. {{ get_config('log_datefmt_logfile', "'%Y-%m-%d %H:%M:%S'") }}
  545. # The format of the console logging messages. Allowed formatting options can
  546. # be seen here: http://docs.python.org/library/logging.html#logrecord-attributes
  547. #
  548. # Console log colors are specified by these additional formatters:
  549. #
  550. # %(colorlevel)s
  551. # %(colorname)s
  552. # %(colorprocess)s
  553. # %(colormsg)s
  554. #
  555. # Since it is desirable to include the surrounding brackets, '[' and ']', in
  556. # the coloring of the messages, these color formatters also include padding as
  557. # well. Color LogRecord attributes are only available for console logging.
  558. #
  559. {{ get_config('log_fmt_console', "'%(colorlevel)s %(colormsg)s'") }}
  560. {{ get_config('log_fmt_console', "'[%(levelname)-8s] %(message)s'") }}
  561. #
  562. {{ get_config('log_fmt_logfile', "'%(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s'") }}
  563. # This can be used to control logging levels more specificically. This
  564. # example sets the main salt library at the 'warning' level, but sets
  565. # 'salt.modules' to log at the 'debug' level:
  566. # log_granular_levels:
  567. # 'salt': 'warning'
  568. # 'salt.modules': 'debug'
  569. #
  570. {{ get_config('log_granular_levels', '{}') }}
  571. # To diagnose issues with minions disconnecting or missing returns, ZeroMQ
  572. # supports the use of monitor sockets to log connection events. This
  573. # feature requires ZeroMQ 4.0 or higher.
  574. #
  575. # To enable ZeroMQ monitor sockets, set 'zmq_monitor' to 'True' and log at a
  576. # debug level or higher.
  577. #
  578. # A sample log event is as follows:
  579. #
  580. # [DEBUG ] ZeroMQ event: {'endpoint': 'tcp://127.0.0.1:4505', 'event': 512,
  581. # 'value': 27, 'description': 'EVENT_DISCONNECTED'}
  582. #
  583. # All events logged will include the string 'ZeroMQ event'. A connection event
  584. # should be logged as the minion starts up and initially connects to the
  585. # master. If not, check for debug log level and that the necessary version of
  586. # ZeroMQ is installed.
  587. #
  588. {{ get_config('zmq_monitor', 'False') }}
  589. ###### Module configuration #####
  590. ###########################################
  591. # Salt allows for modules to be passed arbitrary configuration data, any data
  592. # passed here in valid yaml format will be passed on to the salt minion modules
  593. # for use. It is STRONGLY recommended that a naming convention be used in which
  594. # the module name is followed by a . and then the value. Also, all top level
  595. # data must be applied via the yaml dict construct, some examples:
  596. #
  597. # You can specify that all modules should run in test mode:
  598. {{ get_config('test', 'True') }}
  599. # A simple value for the test module:
  600. #test.foo: foo
  601. #
  602. # A list for the test module:
  603. #test.bar: [baz,quo]
  604. #
  605. # A dict for the test module:
  606. #test.baz: {spam: sausage, cheese: bread}
  607. #
  608. #
  609. ###### Update settings ######
  610. ###########################################
  611. # Using the features in Esky, a salt minion can both run as a frozen app and
  612. # be updated on the fly. These options control how the update process
  613. # (saltutil.update()) behaves.
  614. #
  615. # The url for finding and downloading updates. Disabled by default.
  616. {{ get_config('update_url', 'False') }}
  617. #
  618. # The list of services to restart after a successful update. Empty by default.
  619. {{ get_config('update_restart_services', '[]') }}
  620. ###### Keepalive settings ######
  621. ############################################
  622. # ZeroMQ now includes support for configuring SO_KEEPALIVE if supported by
  623. # the OS. If connections between the minion and the master pass through
  624. # a state tracking device such as a firewall or VPN gateway, there is
  625. # the risk that it could tear down the connection the master and minion
  626. # without informing either party that their connection has been taken away.
  627. # Enabling TCP Keepalives prevents this from happening.
  628. # Overall state of TCP Keepalives, enable (1 or True), disable (0 or False)
  629. # or leave to the OS defaults (-1), on Linux, typically disabled. Default True, enabled.
  630. {{ get_config('tcp_keepalive', 'True') }}
  631. # How long before the first keepalive should be sent in seconds. Default 300
  632. # to send the first keepalive after 5 minutes, OS default (-1) is typically 7200 seconds
  633. # on Linux see /proc/sys/net/ipv4/tcp_keepalive_time.
  634. {{ get_config('tcp_keepalive_idle', '300') }}
  635. # How many lost probes are needed to consider the connection lost. Default -1
  636. # to use OS defaults, typically 9 on Linux, see /proc/sys/net/ipv4/tcp_keepalive_probes.
  637. {{ get_config('tcp_keepalive_cnt', '-1') }}
  638. # How often, in seconds, to send keepalives after the first one. Default -1 to
  639. # use OS defaults, typically 75 seconds on Linux, see
  640. # /proc/sys/net/ipv4/tcp_keepalive_intvl.
  641. {{ get_config('tcp_keepalive_intvl', '-1') }}
  642. ###### Windows Software settings ######
  643. ############################################
  644. # Location of the repository cache file on the master:
  645. {{ get_config('win_repo_cachefile', 'salt://win/repo/winrepo.p') }}
  646. ###### Returner settings ######
  647. ############################################
  648. # Which returner(s) will be used for minion's result:
  649. {{ get_config('return', '') }}
  650. ###### Miscellaneous settings ######
  651. ############################################
  652. # Default match type for filtering events tags: startswith, endswith, find, regex, fnmatch
  653. #event_match_type: startswith
  654. {{ get_config('event_match_type', 'startswith') }}