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