Saltstack Official Salt Formula
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  1. # This file managed by Salt, do not edit!!
  2. {% set salt = pillar.get('salt', {}) -%}
  3. {% set master = salt.get('master', {}) -%}
  4. #
  5. #
  6. ##### Primary configuration settings #####
  7. ##########################################
  8. # This configuration file is used to manage the behavior of the Salt Master
  9. # Values that are commented out but have no space after the comment are
  10. # defaults that need not be set in the config. If there is a space after the
  11. # comment that the value is presented as an example and is not the default.
  12. # Per default, the master will automatically include all config files
  13. # from master.d/*.conf (master.d is a directory in the same directory
  14. # as the main master config file)
  15. #default_include: master.d/*.conf
  16. # The address of the interface to bind to
  17. interface: {{ master.get('interface', '0.0.0.0') }}
  18. # The tcp port used by the publisher
  19. #publish_port: {{ salt.get('publish_port', 4505) }}
  20. # The user to run the salt-master as. Salt will update all permissions to
  21. # allow the specified user to run the master. If the modified files cause
  22. # conflicts set verify_env to False.
  23. user: {{ master.get('user', 'root') }}
  24. # Max open files
  25. # Each minion connecting to the master uses AT LEAST one file descriptor, the
  26. # master subscription connection. If enough minions connect you might start
  27. # seeing on the console(and then salt-master crashes):
  28. # Too many open files (tcp_listener.cpp:335)
  29. # Aborted (core dumped)
  30. #
  31. # By default this value will be the one of `ulimit -Hn`, ie, the hard limit for
  32. # max open files.
  33. #
  34. # If you wish to set a different value than the default one, uncomment and
  35. # configure this setting. Remember that this value CANNOT be higher than the
  36. # hard limit. Raising the hard limit depends on your OS and/or distribution,
  37. # a good way to find the limit is to search the internet for(for example):
  38. # raise max open files hard limit debian
  39. #
  40. max_open_files: {{ salt.get('max_open_files', 100000) }}
  41. # The number of worker threads to start, these threads are used to manage
  42. # return calls made from minions to the master, if the master seems to be
  43. # running slowly, increase the number of threads
  44. worker_threads: {{ master.get('worker_threads', '5') }}
  45. # The port used by the communication interface. The ret (return) port is the
  46. # interface used for the file server, authentication, job returnes, etc.
  47. ret_port: {{ salt.get('ret_port', 4506) }}
  48. # Specify the location of the daemon process ID file
  49. pidfile: {{ master.get('pid_file', '/var/run/salt-master.pid') }}
  50. # The root directory prepended to these options: pki_dir, cachedir,
  51. # sock_dir, log_file, autosign_file, extension_modules, key_logfile, pidfile.
  52. root_dir: {{ salt.get('root_dir', '/' ) }}
  53. # Directory used to store public key data
  54. pki_dir: {{ salt.get('pki_dir', '/etc/salt/pki/master') }}
  55. # Directory to store job and cache data
  56. cachedir: {{ salt.get('cachedir', '/var/cache/salt/master') }}
  57. # Verify and set permissions on configuration directories at startup
  58. verify_env: {{ salt.get('verify_env', 'True') }}
  59. # Set the number of hours to keep old job information in the job cache
  60. keep_jobs: {{ salt.get('keep_jobs', 24) }}
  61. # Set the default timeout for the salt command and api, the default is 5
  62. # seconds
  63. timeout: {{ salt.get('timeout', 5) }}
  64. # The loop_interval option controls the seconds for the master's maintinance
  65. # process check cycle. This process updates file server backends, cleans the
  66. # job cache and executes the scheduler.
  67. loop_interval: {{ salt.get('loop_interval', 60) }}
  68. # Set the default outputter used by the salt command. The default is "nested"
  69. output: {{ salt.get('output', 'nested') }}
  70. # By default output is colored, to disable colored output set the color value
  71. # to False
  72. color: {{ salt.geT('color', 'True') }}
  73. # Set the directory used to hold unix sockets
  74. #sock_dir: /var/run/salt/master
  75. sock_dir: {{ salt.get('sock_dir', '/var/run/salt/master') }}
  76. # The master maintains a job cache, while this is a great addition it can be
  77. # a burden on the master for larger deployments (over 5000 minions).
  78. # Disabling the job cache will make previously executed jobs unavailable to
  79. # the jobs system and is not generally recommended.
  80. #
  81. job_cache: {{ salt.get('job_cache', True) }}
  82. # Cache minion grains and pillar data in the cachedir.
  83. minion_data_cache: {{ salt.get('minion_data_cache', True) }}
  84. # The master can include configuration from other files. To enable this,
  85. # pass a list of paths to this option. The paths can be either relative or
  86. # absolute; if relative, they are considered to be relative to the directory
  87. # the main master configuration file lives in (this file). Paths can make use
  88. # of shell-style globbing. If no files are matched by a path passed to this
  89. # option then the master will log a warning message.
  90. #
  91. #
  92. # Include a config file from some other path:
  93. # include: /etc/salt/extra_config
  94. #
  95. # Include config from several files and directories:
  96. # include:
  97. # - /etc/salt/extra_config
  98. ##### Security settings #####
  99. ##########################################
  100. # Enable "open mode", this mode still maintains encryption, but turns off
  101. # authentication, this is only intended for highly secure environments or for
  102. # the situation where your keys end up in a bad state. If you run in open mode
  103. # you do so at your own risk!
  104. open_mode: {{ salt.get('open_mode', False) }}
  105. # Enable auto_accept, this setting will automatically accept all incoming
  106. # public keys from the minions. Note that this is insecure.
  107. auto_accept: {{ salt.get('auto_accept', False) }}
  108. # If the autosign_file is specified only incoming keys specified in
  109. # the autosign_file will be automatically accepted. This is insecure.
  110. # Regular expressions as well as globing lines are supported.
  111. autosign_file: {{ salt.get('autosign_file', '/etc/salt/autosign.conf') }}
  112. # Enable permissive access to the salt keys. This allows you to run the
  113. # master or minion as root, but have a non-root group be given access to
  114. # your pki_dir. To make the access explicit, root must belong to the group
  115. # you've given access to. This is potentially quite insecure.
  116. # If an autosign_file is specified, enabling permissive_pki_access will allow group access
  117. # to that specific file.
  118. permissive_pki_access: {{ salt.get('permissive_pki_access', False) }}
  119. # Allow users on the master access to execute specific commands on minions.
  120. # This setting should be treated with care since it opens up execution
  121. # capabilities to non root users. By default this capability is completely
  122. # disabled.
  123. #
  124. # client_acl:
  125. # larry:
  126. # - test.ping
  127. # - network.*
  128. #
  129. client_acl: {{ master.get('client_acl', '{}')}}
  130. # Blacklist any of the following users or modules
  131. #
  132. # This example would blacklist all non sudo users, including root from
  133. # running any commands. It would also blacklist any use of the "cmd"
  134. # module.
  135. # This is completely disabled by default.
  136. #
  137. # client_acl_blacklist:
  138. # users:
  139. # - root
  140. # - '^(?!sudo_).*$' # all non sudo users
  141. # modules:
  142. # - cmd
  143. {% if master['client_acl_blacklist'] is defined -%}
  144. client_acl_blacklist:
  145. users:
  146. {% for user in master['client_acl_blacklist'].get('users', []) -%}
  147. - {{ user }}
  148. {% endfor -%}
  149. modules:
  150. {% for mod in master['client_acl_blacklist'].get('modules', []) -%}
  151. - {{ mod }}
  152. {% endfor -%}
  153. {% endif -%}
  154. # The external auth system uses the Salt auth modules to authenticate and
  155. # validate users to access areas of the Salt system
  156. #
  157. # external_auth:
  158. # pam:
  159. # fred:
  160. # - test.*
  161. external_auth: {{ master.get('external_auth', '{}') }}
  162. #
  163. # Time (in seconds) for a newly generated token to live. Default: 12 hours
  164. # token_expire: 43200
  165. token_expire: {{ salt.get('token_expire', 43200) }}
  166. ##### Master Module Management #####
  167. ##########################################
  168. # Manage how master side modules are loaded
  169. # Add any additional locations to look for master runners
  170. runner_dirs: {{ master.get('runner_dirs', '[]') }}
  171. # Enable Cython for master side modules
  172. cython_enable: {{ master.get('cython_enable', False) }}
  173. ##### State System settings #####
  174. ##########################################
  175. # The state system uses a "top" file to tell the minions what environment to
  176. # use and what modules to use. The state_top file is defined relative to the
  177. # root of the base environment as defined in "File Server settings" below.
  178. state_top: {{ salt.get('state_top', 'top.sls') }}
  179. # The master_tops option replaces the external_nodes option by creating
  180. # a plugable system for the generation of external top data. The external_nodes
  181. # option is deprecated by the master_tops option.
  182. # To gain the capabilities of the classic external_nodes system, use the
  183. # following configuration:
  184. # master_tops:
  185. # ext_nodes: <Shell command which returns yaml>
  186. #
  187. #master_tops: {}
  188. # The external_nodes option allows Salt to gather data that would normally be
  189. # placed in a top file. The external_nodes option is the executable that will
  190. # return the ENC data. Remember that Salt will look for external nodes AND top
  191. # files and combine the results if both are enabled!
  192. #external_nodes: None
  193. external_nodes: {{ salt.get('external_nodes', 'None') }}
  194. # The renderer to use on the minions to render the state data
  195. #renderer: yaml_jinja
  196. renderer: {{ salt.get('renderer', 'yaml_jinja') }}
  197. # The failhard option tells the minions to stop immediately after the first
  198. # failure detected in the state execution, defaults to False
  199. #failhard: False
  200. failhard: {{ salt.get('failhard', 'False') }}
  201. # The state_verbose and state_output settings can be used to change the way
  202. # state system data is printed to the display. By default all data is printed.
  203. # The state_verbose setting can be set to True or False, when set to False
  204. # all data that has a result of True and no changes will be suppressed.
  205. #state_verbose: True
  206. state_verbose: {{ salt.get('state_verbose', 'True') }}
  207. # The state_output setting changes if the output is the full multi line
  208. # output for each changed state if set to 'full', but if set to 'terse'
  209. # the output will be shortened to a single line. If set to 'mixed', the output
  210. # will be terse unless a state failed, in which case that output will be full.
  211. #state_output: full
  212. state_output: {{ salt.get('state_output', 'full') }}
  213. ##### File Server settings #####
  214. ##########################################
  215. # Salt runs a lightweight file server written in zeromq to deliver files to
  216. # minions. This file server is built into the master daemon and does not
  217. # require a dedicated port.
  218. # The file server works on environments passed to the master, each environment
  219. # can have multiple root directories, the subdirectories in the multiple file
  220. # roots cannot match, otherwise the downloaded files will not be able to be
  221. # reliably ensured. A base environment is required to house the top file.
  222. # Example:
  223. # file_roots:
  224. # base:
  225. # - /srv/salt/
  226. # dev:
  227. # - /srv/salt/dev/services
  228. # - /srv/salt/dev/states
  229. # prod:
  230. # - /srv/salt/prod/services
  231. # - /srv/salt/prod/states
  232. {% if salt['file_roots'] is defined -%}
  233. file_roots:
  234. {% for name, roots in salt['file_roots'].items() -%}
  235. {{ name }}:
  236. {% for dir in roots -%}
  237. - {{ dir }}
  238. {% endfor -%}
  239. {% endfor -%}
  240. {% endif -%}
  241. #file_roots:
  242. # base:
  243. # - /srv/salt
  244. # The hash_type is the hash to use when discovering the hash of a file on
  245. # the master server, the default is md5, but sha1, sha224, sha256, sha384
  246. # and sha512 are also supported.
  247. #hash_type: md5
  248. hash_type: {{ salt.get('hash_type', 'md5') }}
  249. # The buffer size in the file server can be adjusted here:
  250. #file_buffer_size: 1048576
  251. file_buffer_size: {{ salt.get('file_buffer_size', '1048576') }}
  252. # A regular expression (or a list of expressions) that will be matched
  253. # against the file path before syncing the modules and states to the minions.
  254. # This includes files affected by the file.recurse state.
  255. # For example, if you manage your custom modules and states in subversion
  256. # and don't want all the '.svn' folders and content synced to your minions,
  257. # you could set this to '/\.svn($|/)'. By default nothing is ignored.
  258. # file_ignore_regex:
  259. # - '/\.svn($|/)'
  260. # - '/\.git($|/)'
  261. # A file glob (or list of file globs) that will be matched against the file
  262. # path before syncing the modules and states to the minions. This is similar
  263. # to file_ignore_regex above, but works on globs instead of regex. By default
  264. # nothing is ignored.
  265. # file_ignore_glob:
  266. # - '*.pyc'
  267. # - '*/somefolder/*.bak'
  268. # File Server Backend
  269. # Salt supports a modular fileserver backend system, this system allows
  270. # the salt master to link directly to third party systems to gather and
  271. # manage the files available to minions. Multiple backends can be
  272. # configured and will be searched for the requested file in the order in which
  273. # they are defined here. The default setting only enables the standard backend
  274. # "roots" which uses the "file_roots" option.
  275. #fileserver_backend:
  276. # - roots
  277. # To use multiple backends list them in the order they are searched:
  278. # fileserver_backend:
  279. # - git
  280. # - roots
  281. fileserver_backend: {{ master.get('fileserver_backend', '[]') }}
  282. # Git fileserver backend configuration
  283. # When using the git fileserver backend at least one git remote needs to be
  284. # defined. The user running the salt master will need read access to the repo.
  285. # gitfs_remotes:
  286. # - git://github.com/saltstack/salt-states.git
  287. # - file:///var/git/saltmaster
  288. # The repos will be searched in order to find the file requested by a client
  289. # and the first repo to have the file will return it.
  290. # When using the git backend branches and tags are translated into salt
  291. # environments.
  292. # Note: file:// repos will be treated as a remote, so refs you want used must
  293. # exist in that repo as *local* refs.
  294. {% if master['gitfs_remotes'] is defined -%}
  295. gitfs_remotes:
  296. {% for remote in master['gitfs_remotes'] -%}
  297. - {{ remote }}
  298. {% endfor -%}
  299. {% endif %}
  300. ##### Pillar settings #####
  301. ##########################################
  302. # Salt Pillars allow for the building of global data that can be made selectively
  303. # available to different minions based on minion grain filtering. The Salt
  304. # Pillar is laid out in the same fashion as the file server, with environments,
  305. # a top file and sls files. However, pillar data does not need to be in the
  306. # highstate format, and is generally just key/value pairs.
  307. {% if salt['pillar_roots'] is defined -%}
  308. pillar_roots:
  309. {% for name, roots in salt['pillar_roots'].items() -%}
  310. {{ name }}:
  311. {% for dir in roots -%}
  312. - {{ dir }}
  313. {% endfor -%}
  314. {% endfor -%}
  315. {% endif -%}
  316. #pillar_roots:
  317. # base:
  318. # - /srv/pillar
  319. # ext_pillar:
  320. # - hiera: /etc/hiera.yaml
  321. # - cmd_yaml: cat /etc/salt/yaml
  322. # The pillar_opts option adds the master configuration file data to a dict in
  323. # the pillar called "master". This is used to set simple configurations in the
  324. # master config file that can then be used on minions.
  325. #pillar_opts: True
  326. ##### Syndic settings #####
  327. ##########################################
  328. # The Salt syndic is used to pass commands through a master from a higher
  329. # master. Using the syndic is simple, if this is a master that will have
  330. # syndic servers(s) below it set the "order_masters" setting to True, if this
  331. # is a master that will be running a syndic daemon for passthrough the
  332. # "syndic_master" setting needs to be set to the location of the master server
  333. # to receive commands from.
  334. # Set the order_masters setting to True if this master will command lower
  335. # masters' syndic interfaces.
  336. #order_masters: False
  337. order_masters: {{ salt.get('order_masters', 'False') }}
  338. # If this master will be running a salt syndic daemon, syndic_master tells
  339. # this master where to receive commands from.
  340. #syndic_master: {{ salt.get('syndic_master', 'masterofmaster') }}
  341. ##### Peer Publish settings #####
  342. ##########################################
  343. # Salt minions can send commands to other minions, but only if the minion is
  344. # allowed to. By default "Peer Publication" is disabled, and when enabled it
  345. # is enabled for specific minions and specific commands. This allows secure
  346. # compartmentalization of commands based on individual minions.
  347. # The configuration uses regular expressions to match minions and then a list
  348. # of regular expressions to match functions. The following will allow the
  349. # minion authenticated as foo.example.com to execute functions from the test
  350. # and pkg modules.
  351. # peer:
  352. # foo.example.com:
  353. # - test.*
  354. # - pkg.*
  355. #
  356. # This will allow all minions to execute all commands:
  357. # peer:
  358. # .*:
  359. # - .*
  360. # This is not recommended, since it would allow anyone who gets root on any
  361. # single minion to instantly have root on all of the minions!
  362. {% if salt['peer'] is defined -%}
  363. peer:
  364. {% for name, roots in salt['peer'].items() -%}
  365. {{ name }}:
  366. {% for mod in roots -%}
  367. - {{ mod }}
  368. {% endfor -%}
  369. {% endfor -%}
  370. {% endif -%}
  371. # Minions can also be allowed to execute runners from the salt master.
  372. # Since executing a runner from the minion could be considered a security risk,
  373. # it needs to be enabled. This setting functions just like the peer setting
  374. # except that it opens up runners instead of module functions.
  375. #
  376. # All peer runner support is turned off by default and must be enabled before
  377. # using. This will enable all peer runners for all minions:
  378. #
  379. # peer_run:
  380. # .*:
  381. # - .*
  382. #
  383. # To enable just the manage.up runner for the minion foo.example.com:
  384. #
  385. # peer_run:
  386. # foo.example.com:
  387. # - manage.up
  388. {% if salt['peer_run'] is defined -%}
  389. peer_run:
  390. {% for name, roots in salt['peer_run'].items() -%}
  391. {{ name }}:
  392. {% for mod in roots -%}
  393. - {{ mod }}
  394. {% endfor -%}
  395. {% endfor -%}
  396. {% endif -%}
  397. ##### Logging settings #####
  398. ##########################################
  399. # The location of the master log file
  400. # The master log can be sent to a regular file, local path name, or network
  401. # location. Remote logging works best when configured to use rsyslogd(8) (e.g.:
  402. # ``file:///dev/log``), with rsyslogd(8) configured for network logging. The URI
  403. # format is: <file|udp|tcp>://<host|socketpath>:<port-if-required>/<log-facility>
  404. #log_file: /var/log/salt/master
  405. #log_file: file:///dev/log
  406. #log_file: udp://loghost:10514
  407. log_file: {{ salt.get('log_file', '/var/log/salt/master') }}
  408. key_logfile: {{ salt.get('key_logfile', '/var/log/salt/key') }}
  409. # The level of messages to send to the console.
  410. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
  411. log_level: {{ salt.get('log_level', 'warning') }}
  412. # The level of messages to send to the log file.
  413. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
  414. log_level_logfile: {{ salt.get('log_level_logfile', 'warning') }}
  415. # The date and time format used in log messages. Allowed date/time formating
  416. # can be seen here: http://docs.python.org/library/time.html#time.strftime
  417. #log_datefmt: '%H:%M:%S'
  418. log_datefmt_logfile: {{ salt.get('log_datefmt_logfile', '%Y-%m-%d %H:%M:%S') }}
  419. # The format of the console logging messages. Allowed formatting options can
  420. # be seen here: http://docs.python.org/library/logging.html#logrecord-attributes
  421. #log_fmt_console: '[%(levelname)-8s] %(message)s'
  422. log_fmt_logfile: {{ salt.get('log_fmt_logfile', '%(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s')}}
  423. # This can be used to control logging levels more specificically. This
  424. # example sets the main salt library at the 'warning' level, but sets
  425. # 'salt.modules' to log at the 'debug' level:
  426. # log_granular_levels:
  427. # 'salt': 'warning',
  428. # 'salt.modules': 'debug'
  429. #
  430. #log_granular_levels: {}
  431. {% if salt['log_granular_levels'] is defined %}
  432. log_granular_levels:
  433. {% for name, lvl in salt['log_granular_levels'] %}
  434. {{ name }}: {{ lvl }}
  435. {% endfor -%}
  436. {% endif %}
  437. ##### Node Groups #####
  438. ##########################################
  439. # Node groups allow for logical groupings of minion nodes.
  440. # A group consists of a group name and a compound target.
  441. #
  442. # nodegroups:
  443. # group1: 'L@foo.domain.com,bar.domain.com,baz.domain.com and bl*.domain.com'
  444. # group2: 'G@os:Debian and foo.domain.com'
  445. {% if salt['nodegroups'] is defined %}
  446. nodegroups:
  447. {% for name, lvl in salt['nodegroups'] %}
  448. {{ name }}: {{ lvl }}
  449. {% endfor -%}
  450. {% endif %}
  451. ##### Range Cluster settings #####
  452. ##########################################
  453. # The range server (and optional port) that serves your cluster information
  454. # https://github.com/grierj/range/wiki/Introduction-to-Range-with-YAML-files
  455. #
  456. # range_server: range:80
  457. ##### Windows Software Repo settings #####
  458. ##############################################
  459. # Location of the repo on the master
  460. # win_repo: '/srv/salt/win/repo'
  461. # Location of the master's repo cache file
  462. # win_repo_mastercachefile: '/srv/salt/win/repo/winrepo.p'
  463. # List of git repositories to include with the local repo
  464. # win_gitrepos:
  465. # - 'https://github.com/saltstack/salt-winrepo.git'