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.

master 23KB

11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  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. {% if 'fileserver_backend' in master -%}
  333. fileserver_backend:
  334. {% for backend in master['fileserver_backend'] -%}
  335. - {{ backend }}
  336. {% endfor -%}
  337. {% endif %}
  338. # Git fileserver backend configuration
  339. # When using the git fileserver backend at least one git remote needs to be
  340. # defined. The user running the salt master will need read access to the repo.
  341. # gitfs_remotes:
  342. # - git://github.com/saltstack/salt-states.git
  343. # - file:///var/git/saltmaster
  344. # The repos will be searched in order to find the file requested by a client
  345. # and the first repo to have the file will return it.
  346. # When using the git backend branches and tags are translated into salt
  347. # environments.
  348. # Note: file:// repos will be treated as a remote, so refs you want used must
  349. # exist in that repo as *local* refs.
  350. {% if 'gitfs_remotes' in master -%}
  351. gitfs_remotes:
  352. {% for remote in master['gitfs_remotes'] -%}
  353. - {{ remote }}
  354. {% endfor -%}
  355. {% endif %}
  356. ##### Pillar settings #####
  357. ##########################################
  358. # Salt Pillars allow for the building of global data that can be made selectively
  359. # available to different minions based on minion grain filtering. The Salt
  360. # Pillar is laid out in the same fashion as the file server, with environments,
  361. # a top file and sls files. However, pillar data does not need to be in the
  362. # highstate format, and is generally just key/value pairs.
  363. {% if 'pillar_roots' in master -%}
  364. pillar_roots:
  365. {% for name, roots in master['pillar_roots'].items() -%}
  366. {{ name }}:
  367. {% for dir in roots -%}
  368. - {{ dir }}
  369. {% endfor -%}
  370. {% endfor -%}
  371. {% elif 'pillar_roots' in salt -%}
  372. pillar_roots:
  373. {% for name, roots in salt['pillar_roots'].items() -%}
  374. {{ name }}:
  375. {% for dir in roots -%}
  376. - {{ dir }}
  377. {% endfor -%}
  378. {% endfor -%}
  379. {% else %}
  380. #pillar_roots:
  381. # base:
  382. # - /srv/pillar
  383. {%- endif %}
  384. {% if 'ext_pillar' in master -%}
  385. ext_pillar:
  386. {% for name, args in master['ext_pillar'].items() -%}
  387. - {{ name }}: {{ args }}
  388. {% endfor -%}
  389. {% elif 'pillar_roots' in salt -%}
  390. ext_pillar:
  391. {% for name, args in salt['ext_pillar'].items() -%}
  392. - {{ name }}: {{ args }}
  393. {% endfor -%}
  394. {% else %}
  395. # ext_pillar:
  396. # - hiera: /etc/hiera.yaml
  397. # - cmd_yaml: cat /etc/salt/yaml
  398. {%- endif %}
  399. # The pillar_opts option adds the master configuration file data to a dict in
  400. # the pillar called "master". This is used to set simple configurations in the
  401. # master config file that can then be used on minions.
  402. {{ get_config('pillar_opts', 'True') }}
  403. ##### Syndic settings #####
  404. ##########################################
  405. # The Salt syndic is used to pass commands through a master from a higher
  406. # master. Using the syndic is simple, if this is a master that will have
  407. # syndic servers(s) below it set the "order_masters" setting to True, if this
  408. # is a master that will be running a syndic daemon for passthrough the
  409. # "syndic_master" setting needs to be set to the location of the master server
  410. # to receive commands from.
  411. # Set the order_masters setting to True if this master will command lower
  412. # masters' syndic interfaces.
  413. {{ get_config('order_masters', 'False') }}
  414. # If this master will be running a salt syndic daemon, syndic_master tells
  415. # this master where to receive commands from.
  416. {{ get_config('syndic_master', 'masterofmaster') }}
  417. # This is the 'ret_port' of the MasterOfMaster
  418. {{ get_config('syndic_master_port', '4506') }}
  419. # PID file of the syndic daemon
  420. {{ get_config('syndic_pidfile', '/var/run/salt-syndic.pid') }}
  421. # LOG file of the syndic daemon
  422. {{ get_config('syndic_log_file', 'syndic.log') }}
  423. ##### Peer Publish settings #####
  424. ##########################################
  425. # Salt minions can send commands to other minions, but only if the minion is
  426. # allowed to. By default "Peer Publication" is disabled, and when enabled it
  427. # is enabled for specific minions and specific commands. This allows secure
  428. # compartmentalization of commands based on individual minions.
  429. # The configuration uses regular expressions to match minions and then a list
  430. # of regular expressions to match functions. The following will allow the
  431. # minion authenticated as foo.example.com to execute functions from the test
  432. # and pkg modules.
  433. # peer:
  434. # foo.example.com:
  435. # - test.*
  436. # - pkg.*
  437. #
  438. # This will allow all minions to execute all commands:
  439. # peer:
  440. # .*:
  441. # - .*
  442. # This is not recommended, since it would allow anyone who gets root on any
  443. # single minion to instantly have root on all of the minions!
  444. {% if 'peer' in master -%}
  445. peer:
  446. {% for name, roots in master['peer'].items() -%}
  447. {{ name }}:
  448. {% for mod in roots -%}
  449. - {{ mod }}
  450. {% endfor -%}
  451. {% endfor -%}
  452. {% elif 'peer' in salt -%}
  453. peer:
  454. {% for name, roots in salt['peer'].items() -%}
  455. {{ name }}:
  456. {% for mod in roots -%}
  457. - {{ mod }}
  458. {% endfor -%}
  459. {% endfor -%}
  460. {% endif -%}
  461. # Minions can also be allowed to execute runners from the salt master.
  462. # Since executing a runner from the minion could be considered a security risk,
  463. # it needs to be enabled. This setting functions just like the peer setting
  464. # except that it opens up runners instead of module functions.
  465. #
  466. # All peer runner support is turned off by default and must be enabled before
  467. # using. This will enable all peer runners for all minions:
  468. #
  469. # peer_run:
  470. # .*:
  471. # - .*
  472. #
  473. # To enable just the manage.up runner for the minion foo.example.com:
  474. #
  475. # peer_run:
  476. # foo.example.com:
  477. # - manage.up
  478. {% if 'peer_run' in master -%}
  479. peer_run:
  480. {% for name, roots in master['peer_run'].items() -%}
  481. {{ name }}:
  482. {% for mod in roots -%}
  483. - {{ mod }}
  484. {% endfor -%}
  485. {% endfor -%}
  486. {% elif 'peer_run' in salt -%}
  487. peer_run:
  488. {% for name, roots in salt['peer_run'].items() -%}
  489. {{ name }}:
  490. {% for mod in roots -%}
  491. - {{ mod }}
  492. {% endfor -%}
  493. {% endfor -%}
  494. {% endif -%}
  495. ##### Logging settings #####
  496. ##########################################
  497. # The location of the master log file
  498. # The master log can be sent to a regular file, local path name, or network
  499. # location. Remote logging works best when configured to use rsyslogd(8) (e.g.:
  500. # ``file:///dev/log``), with rsyslogd(8) configured for network logging. The URI
  501. # format is: <file|udp|tcp>://<host|socketpath>:<port-if-required>/<log-facility>
  502. #log_file: /var/log/salt/master
  503. #log_file: file:///dev/log
  504. #log_file: udp://loghost:10514
  505. {{ get_config('log_file', '/var/log/salt/master') }}
  506. {{ get_config('key_logfile', '/var/log/salt/key') }}
  507. # The level of messages to send to the console.
  508. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
  509. {{ get_config('log_level', 'warning') }}
  510. # The level of messages to send to the log file.
  511. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
  512. {{ get_config('log_level_logfile', 'warning') }}
  513. # The date and time format used in log messages. Allowed date/time formating
  514. # can be seen here: http://docs.python.org/library/time.html#time.strftime
  515. {{ get_config('log_datefmt', "'%H:%M:%S'") }}
  516. {{ get_config('log_datefmt_logfile', "'%Y-%m-%d %H:%M:%S'") }}
  517. # The format of the console logging messages. Allowed formatting options can
  518. # be seen here: http://docs.python.org/library/logging.html#logrecord-attributes
  519. {{ get_config('log_fmt_console', "'[%(levelname)-8s] %(message)s'") }}
  520. {{ get_config('log_fmt_logfile', "'%(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s'") }}
  521. # This can be used to control logging levels more specificically. This
  522. # example sets the main salt library at the 'warning' level, but sets
  523. # 'salt.modules' to log at the 'debug' level:
  524. # log_granular_levels:
  525. # 'salt': 'warning',
  526. # 'salt.modules': 'debug'
  527. #
  528. {% if 'log_granular_levels' in master %}
  529. log_granular_levels:
  530. {% for name, lvl in salt['log_granular_levels'] %}
  531. {{ name }}: {{ lvl }}
  532. {% endfor -%}
  533. {% elif 'log_granular_levels' in salt %}
  534. log_granular_levels:
  535. {% for name, lvl in salt['log_granular_levels'] %}
  536. {{ name }}: {{ lvl }}
  537. {% endfor -%}
  538. {% else %}
  539. #log_granular_levels: {}
  540. {% endif %}
  541. ##### Node Groups #####
  542. ##########################################
  543. # Node groups allow for logical groupings of minion nodes.
  544. # A group consists of a group name and a compound target.
  545. #
  546. # nodegroups:
  547. # group1: 'L@foo.domain.com,bar.domain.com,baz.domain.com and bl*.domain.com'
  548. # group2: 'G@os:Debian and foo.domain.com'
  549. {% if 'nodegroups' in master %}
  550. nodegroups:
  551. {% for name, lvl in master['nodegroups'] %}
  552. {{ name }}: {{ lvl }}
  553. {% endfor -%}
  554. {% elif 'nodegroups' in salt %}
  555. nodegroups:
  556. {% for name, lvl in salt['nodegroups'] %}
  557. {{ name }}: {{ lvl }}
  558. {% endfor -%}
  559. {% endif %}
  560. ##### Range Cluster settings #####
  561. ##########################################
  562. # The range server (and optional port) that serves your cluster information
  563. # https://github.com/grierj/range/wiki/Introduction-to-Range-with-YAML-files
  564. #
  565. {{ get_config('range_server', 'range:80') }}
  566. ##### Windows Software Repo settings #####
  567. ##############################################
  568. # Location of the repo on the master
  569. {{ get_config('win_repo', '/srv/salt/win/repo') }}
  570. # Location of the master's repo cache file
  571. {{ get_config('win_repo_mastercachefile', '/srv/salt/win/repo/winrepo.p') }}
  572. # List of git repositories to include with the local repo
  573. {% if 'win_gitrepos' in master %}
  574. win_gitrepos:
  575. {% for repo in master['win_gitrepos'] %}
  576. - {{ repo }}
  577. {% endfor -%}
  578. {% elif 'win_gitrepos' in salt %}
  579. win_gitrepos:
  580. {% for repo in salt['win_gitrepos'] %}
  581. - {{ repo }}
  582. {% endfor -%}
  583. {% else %}
  584. # win_gitrepos:
  585. # - 'https://github.com/saltstack/salt-winrepo.git'
  586. {% endif %}