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.

663 lines
27KB

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