Saltstack Official Salt Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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