Saltstack Official Salt Formula
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

735 linhas
30KB

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