Saltstack Official Salt Formula
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

442 lines
18KB

  1. # This file managed by Salt, do not edit!!
  2. {% set salt = pillar.get('salt', {}) -%}
  3. {% set minion = salt.get('minion', {}) -%}
  4. ##### Primary configuration settings #####
  5. ##########################################
  6. # Per default the minion will automatically include all config files
  7. # from minion.d/*.conf (minion.d is a directory in the same directory
  8. # as the main minion config file).
  9. default_include: {{ minion.get('default_include', 'minion.d/*.conf') }}
  10. # Set the location of the salt master server, if the master server cannot be
  11. # resolved, then the minion will fail to start.
  12. master: {{ minion.get('master', 'salt') }}
  13. # Set whether the minion should connect to the master via IPv6
  14. ipv6: {{ minion.get('ipv6', 'False') }}
  15. # Set the number of seconds to wait before attempting to resolve
  16. # the master hostname if name resolution fails. Defaults to 30 seconds.
  17. # Set to zero if the minion should shutdown and not retry.
  18. retry_dns: {{ minion.get('retry_dns', '30') }}
  19. # Set the port used by the master reply and authentication server
  20. master_port: {{ minion.get('master_port', '4506') }}
  21. # The user to run salt
  22. user: {{ minion.get('user', 'root') }}
  23. # Specify the location of the daemon process ID file
  24. pidfile: {{ minion.get('pidfile', '/var/run/salt-minion.pid') }}
  25. # The root directory prepended to these options: pki_dir, cachedir, log_file,
  26. # sock_dir, pidfile.
  27. root_dir: {{ minion.get('root_dir', '/') }}
  28. # The directory to store the pki information in
  29. pki_dir: {{ minion.get('pki_dir', '/etc/salt/pki/minion') }}
  30. # Explicitly declare the id for this minion to use, if left commented the id
  31. # will be the hostname as returned by the python call: socket.getfqdn()
  32. # Since salt uses detached ids it is possible to run multiple minions on the
  33. # same machine but with different ids, this can be useful for salt compute
  34. # clusters.
  35. #id:
  36. {% if minion['id'] is defined -%}
  37. id: minion['id']
  38. {% endif -%}
  39. # Append a domain to a hostname in the event that it does not exist. This is
  40. # useful for systems where socket.getfqdn() does not actually result in a
  41. # FQDN (for instance, Solaris).
  42. #append_domain:
  43. {% if minion['append_domain'] is defined -%}
  44. append_domain: minion['append_domain']
  45. {% endif -%}
  46. # Custom static grains for this minion can be specified here and used in SLS
  47. # files just like all other grains. This example sets 4 custom grains, with
  48. # the 'roles' grain having two values that can be matched against:
  49. #grains:
  50. # roles:
  51. # - webserver
  52. # - memcache
  53. # deployment: datacenter4
  54. # cabinet: 13
  55. # cab_u: 14-15
  56. # Where cache data goes
  57. cachedir: {{ minion.get('cachedir', '/var/cache/salt/minion') }}
  58. # Verify and set permissions on configuration directories at startup
  59. verify_env: {{ minion.get('verify_env', 'True') }}
  60. # The minion can locally cache the return data from jobs sent to it, this
  61. # can be a good way to keep track of jobs the minion has executed
  62. # (on the minion side). By default this feature is disabled, to enable
  63. # set cache_jobs to True
  64. cache_jobs: {{ minion.get('cache_jobs', 'False') }}
  65. # set the directory used to hold unix sockets
  66. sock_dir: {{ minion.get('sock_dir', '/var/run/salt/minion') }}
  67. # Set the default outputter used by the salt-call command. The default is
  68. # "nested"
  69. output: {{ minion.get('output', 'nested') }}
  70. #
  71. # By default output is colored, to disable colored output set the color value
  72. # to False
  73. color: {{ minion.get('color', 'True') }}
  74. # Backup files that are replaced by file.managed and file.recurse under
  75. # 'cachedir'/file_backups relative to their original location and appended
  76. # with a timestamp. The only valid setting is "minion". Disabled by default.
  77. #
  78. # Alternatively this can be specified for each file in state files:
  79. #
  80. # /etc/ssh/sshd_config:
  81. # file.managed:
  82. # - source: salt://ssh/sshd_config
  83. # - backup: minion
  84. #
  85. backup_mode: {{ minion.get('backup_mode', 'minion') }}
  86. # When waiting for a master to accept the minion's public key, salt will
  87. # continuously attempt to reconnect until successful. This is the time, in
  88. # seconds, between those reconnection attempts.
  89. acceptance_wait_time: {{ minion.get('acceptance_wait_time', '10') }}
  90. # The loop_interval sets how long in seconds the minion will wait between
  91. # evaluating the scheduler and running cleanup tasks. This defaults to a
  92. # sane 60 seconds, but if the minion scheduler needs to be evaluated more
  93. # often lower this value
  94. loop_interval: {{ minion.get('loop_interval', '60') }}
  95. # When healing, a dns_check is run. This is to make sure that the originally
  96. # resolved dns has not changed. If this is something that does not happen in
  97. # your environment, set this value to False.
  98. dns_check: {{ minion.get('dns_check', 'True') }}
  99. # Windows platforms lack posix IPC and must rely on slower TCP based inter-
  100. # process communications. Set ipc_mode to 'tcp' on such systems
  101. ipc_mode: {{ minion.get('ipc_mode', 'ipc') }}
  102. #
  103. # Overwrite the default tcp ports used by the minion when in tcp mode
  104. tcp_pub_port: {{ minion.get('tcp_pub_port', '4510') }}
  105. tcp_pull_port: {{ minion.get('tcp_pull_port', '4511') }}
  106. # The minion can include configuration from other files. To enable this,
  107. # pass a list of paths to this option. The paths can be either relative or
  108. # absolute; if relative, they are considered to be relative to the directory
  109. # the main minion configuration file lives in (this file). Paths can make use
  110. # of shell-style globbing. If no files are matched by a path passed to this
  111. # option then the minion will log a warning message.
  112. #
  113. #
  114. # Include a config file from some other path:
  115. # include: /etc/salt/extra_config
  116. #
  117. # Include config from several files and directories:
  118. # include:
  119. # - /etc/salt/extra_config
  120. # - /etc/roles/webserver
  121. {% if minion['include'] is defined -%}
  122. {% if isinstance(minion['include'], list) -%}
  123. include:
  124. {% for include in minion['include'] -%}
  125. - {{ include }}
  126. {% endfor -%}
  127. {% else -%}
  128. include: minion['include']
  129. {% endif -%}
  130. {% endif -%}
  131. ##### Minion module management #####
  132. ##########################################
  133. # Disable specific modules. This allows the admin to limit the level of
  134. # access the master has to the minion
  135. disable_modules: {{ [','.join(
  136. minion.get('disable_modules', ['cmd', 'test'])
  137. )] }}
  138. disable_returners: {{ [ ','.join(
  139. minion.get('disable_returners', [])
  140. ) ] }}
  141. #
  142. # Modules can be loaded from arbitrary paths. This enables the easy deployment
  143. # of third party modules. Modules for returners and minions can be loaded.
  144. # Specify a list of extra directories to search for minion modules and
  145. # returners. These paths must be fully qualified!
  146. module_dirs: {{ [ ','.join(
  147. minion.get('module_dirs', [])
  148. ) ] }}
  149. returner_dirs: {{ [ ','.join(
  150. minion.get('returner_dirs', [])
  151. ) ] }}
  152. states_dirs: {{ [ ','.join(
  153. minion.get('states_dirs', [])
  154. ) ] }}
  155. render_dirs: {{ [ ','.join(
  156. minion.get('render_dirs', [])
  157. ) ] }}
  158. #
  159. # A module provider can be statically overwritten or extended for the minion
  160. # via the providers option, in this case the default module will be
  161. # overwritten by the specified module. In this example the pkg module will
  162. # be provided by the yumpkg5 module instead of the system default.
  163. #
  164. # providers:
  165. # pkg: yumpkg5
  166. #
  167. # Enable Cython modules searching and loading. (Default: False)
  168. cython_enable: {{ minion.get('cython_enable', 'False') }}
  169. #
  170. ##### State Management Settings #####
  171. ###########################################
  172. # The state management system executes all of the state templates on the minion
  173. # to enable more granular control of system state management. The type of
  174. # template and serialization used for state management needs to be configured
  175. # on the minion, the default renderer is yaml_jinja. This is a yaml file
  176. # rendered from a jinja template, the available options are:
  177. # yaml_jinja
  178. # yaml_mako
  179. # yaml_wempy
  180. # json_jinja
  181. # json_mako
  182. # json_wempy
  183. #
  184. renderer: {{ minion.get('renderer', 'yaml_jinja') }}
  185. #
  186. # The failhard option tells the minions to stop immediately after the first
  187. # failure detected in the state execution, defaults to False
  188. failhard: {{ minion.get('failhard', 'False') }}
  189. #
  190. # autoload_dynamic_modules Turns on automatic loading of modules found in the
  191. # environments on the master. This is turned on by default, to turn of
  192. # autoloading modules when states run set this value to False
  193. autoload_dynamic_modules: {{ minion.get('autoload_dynamic_modules', 'True') }}
  194. #
  195. # clean_dynamic_modules keeps the dynamic modules on the minion in sync with
  196. # the dynamic modules on the master, this means that if a dynamic module is
  197. # not on the master it will be deleted from the minion. By default this is
  198. # enabled and can be disabled by changing this value to False
  199. clean_dynamic_modules: {{ minion.get('clean_dynamic_modules', 'True') }}
  200. #
  201. # Normally the minion is not isolated to any single environment on the master
  202. # when running states, but the environment can be isolated on the minion side
  203. # by statically setting it. Remember that the recommended way to manage
  204. # environments is to isolate via the top file.
  205. environment: {{ minion.get('environment', 'None') }}
  206. #
  207. # If using the local file directory, then the state top file name needs to be
  208. # defined, by default this is top.sls.
  209. state_top: {{ minion.get('state_top', 'top.sls') }}
  210. #
  211. # Run states when the minion daemon starts. To enable, set startup_states to:
  212. # 'highstate' -- Execute state.highstate
  213. # 'sls' -- Read in the sls_list option and execute the named sls files
  214. # 'top' -- Read top_file option and execute based on that file on the Master
  215. startup_states: {{ salt.get('startup_states', "''") }}
  216. #
  217. # list of states to run when the minion starts up if startup_states is 'sls'
  218. #sls_list:
  219. # - edit.vim
  220. # - hyper
  221. #
  222. # top file to execute if startup_states is 'top'
  223. top_file: {{ salt.get('top_file', "''") }}
  224. ##### File Directory Settings #####
  225. ##########################################
  226. # The Salt Minion can redirect all file server operations to a local directory,
  227. # this allows for the same state tree that is on the master to be used if
  228. # copied completely onto the minion. This is a literal copy of the settings on
  229. # the master but used to reference a local directory on the minion.
  230. # Set the file client, the client defaults to looking on the master server for
  231. # files, but can be directed to look at the local file directory setting
  232. # defined below by setting it to local.
  233. file_client: {{ minion.get('file_client', 'remote') }}
  234. # The file directory works on environments passed to the minion, each environment
  235. # can have multiple root directories, the subdirectories in the multiple file
  236. # roots cannot match, otherwise the downloaded files will not be able to be
  237. # reliably ensured. A base environment is required to house the top file.
  238. # Example:
  239. # file_roots:
  240. # base:
  241. # - /srv/salt/
  242. # dev:
  243. # - /srv/salt/dev/services
  244. # - /srv/salt/dev/states
  245. # prod:
  246. # - /srv/salt/prod/services
  247. # - /srv/salt/prod/states
  248. #
  249. # Default:
  250. #file_roots:
  251. # base:
  252. # - /srv/salt
  253. # The hash_type is the hash to use when discovering the hash of a file in
  254. # the minion directory, the default is md5, but sha1, sha224, sha256, sha384
  255. # and sha512 are also supported.
  256. hash_type: {{ minion.get('hash_type', 'md5') }}
  257. # The Salt pillar is searched for locally if file_client is set to local. If
  258. # this is the case, and pillar data is defined, then the pillar_roots need to
  259. # also be configured on the minion:
  260. #pillar_roots:
  261. # base:
  262. # - /srv/pillar
  263. ###### Security settings #####
  264. ###########################################
  265. # Enable "open mode", this mode still maintains encryption, but turns off
  266. # authentication, this is only intended for highly secure environments or for
  267. # the situation where your keys end up in a bad state. If you run in open mode
  268. # you do so at your own risk!
  269. open_mode: {{ minion.get('open_mode', 'False') }}
  270. # Enable permissive access to the salt keys. This allows you to run the
  271. # master or minion as root, but have a non-root group be given access to
  272. # your pki_dir. To make the access explicit, root must belong to the group
  273. # you've given access to. This is potentially quite insecure.
  274. permissive_pki_access: {{ minion.get('permissive_pki_access', 'False') }}
  275. # The state_verbose and state_output settings can be used to change the way
  276. # state system data is printed to the display. By default all data is printed.
  277. # The state_verbose setting can be set to True or False, when set to False
  278. # all data that has a result of True and no changes will be suppressed.
  279. state_verbose: {{ minion.get('state_verbose', 'True') }}
  280. #
  281. # The state_output setting changes if the output is the full multi line
  282. # output for each changed state if set to 'full', but if set to 'terse'
  283. # the output will be shortened to a single line.
  284. state_output: {{ minion.get('state_output', 'full') }}
  285. #
  286. # Fingerprint of the master public key to double verify the master is valid,
  287. # the master fingerprint can be found by running "salt-key -F master" on the
  288. # salt master.
  289. master_finger: {{ salt.get('master_finger', "''") }}
  290. ###### Thread settings #####
  291. ###########################################
  292. # Disable multiprocessing support, by default when a minion receives a
  293. # publication a new process is spawned and the command is executed therein.
  294. multiprocessing: {{ minion.get('multiprocessing', 'True') }}
  295. ##### Logging settings #####
  296. ##########################################
  297. # The location of the minion log file
  298. # The minion log can be sent to a regular file, local path name, or network
  299. # location. Remote logging works best when configured to use rsyslogd(8) (e.g.:
  300. # ``file:///dev/log``), with rsyslogd(8) configured for network logging. The URI
  301. # format is: <file|udp|tcp>://<host|socketpath>:<port-if-required>/<log-facility>
  302. #log_file: /var/log/salt/minion
  303. #log_file: file:///dev/log
  304. #log_file: udp://loghost:10514
  305. #
  306. #log_file: /var/log/salt/minion
  307. #key_logfile: /var/log/salt/key
  308. #
  309. # The level of messages to send to the console.
  310. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
  311. # Default: 'warning'
  312. #log_level: warning
  313. #
  314. # The level of messages to send to the log file.
  315. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
  316. # Default: 'warning'
  317. log_level_logfile: {{ minion.get('log_level_logfile', 'warning') }}
  318. # The date and time format used in log messages. Allowed date/time formating
  319. # can be seen here: http://docs.python.org/library/time.html#time.strftime
  320. #log_datefmt: '%H:%M:%S'
  321. #log_datefmt_logfile: '%Y-%m-%d %H:%M:%S'
  322. #
  323. # The format of the console logging messages. Allowed formatting options can
  324. # be seen here: http://docs.python.org/library/logging.html#logrecord-attributes
  325. #log_fmt_console: '[%(levelname)-8s] %(message)s'
  326. #log_fmt_logfile: '%(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s'
  327. #
  328. # This can be used to control logging levels more specificically. This
  329. # example sets the main salt library at the 'warning' level, but sets
  330. # 'salt.modules' to log at the 'debug' level:
  331. # log_granular_levels:
  332. # 'salt': 'warning',
  333. # 'salt.modules': 'debug'
  334. #
  335. #log_granular_levels: {}
  336. ###### Module configuration #####
  337. ###########################################
  338. # Salt allows for modules to be passed arbitrary configuration data, any data
  339. # passed here in valid yaml format will be passed on to the salt minion modules
  340. # for use. It is STRONGLY recommended that a naming convention be used in which
  341. # the module name is followed by a . and then the value. Also, all top level
  342. # data must be applied via the yaml dict construct, some examples:
  343. #
  344. # You can specify that all modules should run in test mode:
  345. #test: True
  346. #
  347. # A simple value for the test module:
  348. #test.foo: foo
  349. #
  350. # A list for the test module:
  351. #test.bar: [baz,quo]
  352. #
  353. # A dict for the test module:
  354. #test.baz: {spam: sausage, cheese: bread}
  355. ###### Update settings ######
  356. ###########################################
  357. # Using the features in Esky, a salt minion can both run as a frozen app and
  358. # be updated on the fly. These options control how the update process
  359. # (saltutil.update()) behaves.
  360. #
  361. # The url for finding and downloading updates. Disabled by default.
  362. update_url: {{ minion.get('update_url', 'False') }}
  363. #
  364. # The list of services to restart after a successful update. Empty by default.
  365. update_restart_services: {{ [ ','.join(
  366. minion.get('update_restart_services', [])
  367. ) ] }}
  368. ###### Keepalive settings ######
  369. ############################################
  370. # ZeroMQ now includes support for configuring SO_KEEPALIVE if supported by
  371. # the OS. If connections between the minion and the master pass through
  372. # a state tracking device such as a firewall or VPN gateway, there is
  373. # the risk that it could tear down the connection the master and minion
  374. # without informing either party that their connection has been taken away.
  375. # Enabling TCP Keepalives prevents this from happening.
  376. #
  377. # Overall state of TCP Keepalives, enable (1 or True), disable (0 or False)
  378. # or leave to the OS defaults (-1), on Linux, typically disabled. Default True, enabled.
  379. tcp_keepalive: {{ minion.get('tcp_keepalive', 'True') }}
  380. #
  381. # How long before the first keepalive should be sent in seconds. Default 300
  382. # to send the first keepalive after 5 minutes, OS default (-1) is typically 7200 seconds
  383. # on Linux see /proc/sys/net/ipv4/tcp_keepalive_time.
  384. tcp_keepalive_idle: {{ minion.get('tcp_keepalive_idle', '300') }}
  385. #
  386. # How many lost probes are needed to consider the connection lost. Default -1
  387. # to use OS defaults, typically 9 on Linux, see /proc/sys/net/ipv4/tcp_keepalive_probes.
  388. tcp_keepalive_cnt: {{ minion.get('tcp_keepalive_cnt', '-1') }}
  389. #
  390. # How often, in seconds, to send keepalives after the first one. Default -1 to
  391. # use OS defaults, typically 75 seconds on Linux, see
  392. # /proc/sys/net/ipv4/tcp_keepalive_intvl.
  393. tcp_keepalive_intvl: {{ minion.get('tcp_keepalive_intvl', '-1') }}
  394. ###### Windows Software settings ######
  395. ############################################
  396. # Location of the repository cache file on the master
  397. # win_repo_cachefile: 'salt://win/repo/winrepo.p'