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.

f_defaults.conf 58KB

Fixed pillar_roots generation for salt-master. With a simple pillar like this:: $ sudo salt-call --config-dir /srv/etc/bootstrap --pillar-root /srv/pillar pillar.get salt:pillar_roots local: ---------- base: - /srv/pillar This was generated in /etc/salt/master.d/f_defaults.conf:: # highstate format, and is generally just key/value pairs. pillar_roots:base:- /srv/pillar # Resulting in parse errors by salt:: $ sudo salt '*' state.highstate [ERROR ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key in "<string>", line 531, column 1: pillar_roots:base:- /srv/pillar ^ could not found expected ':' in "<string>", line 532, column 1: # ^ [ERROR ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key in "<string>", line 531, column 1: pillar_roots:base:- /srv/pillar ^ could not found expected ':' in "<string>", line 532, column 1: # ^ This patch will fix it as such:: ID: salt-master Function: file.recurse Name: /etc/salt/master.d Result: True Comment: Recursively updated /etc/salt/master.d Started: 11:37:12.946823 Duration: 6255.296 ms Changes: ---------- /etc/salt/master.d/f_defaults.conf: ---------- diff: --- +++ @@ -528,7 +528,9 @@ # Pillar is laid out in the same fashion as the file server, with environments, # a top file and sls files. However, pillar data does not need to be in the # highstate format, and is generally just key/value pairs. -pillar_roots:base:- /srv/pillar +pillar_roots: + base: + - /srv/pillar # Resulting in:: # highstate format, and is generally just key/value pairs. pillar_roots: base: - /srv/pillar #
9 years ago
Fixed pillar_roots generation for salt-master. With a simple pillar like this:: $ sudo salt-call --config-dir /srv/etc/bootstrap --pillar-root /srv/pillar pillar.get salt:pillar_roots local: ---------- base: - /srv/pillar This was generated in /etc/salt/master.d/f_defaults.conf:: # highstate format, and is generally just key/value pairs. pillar_roots:base:- /srv/pillar # Resulting in parse errors by salt:: $ sudo salt '*' state.highstate [ERROR ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key in "<string>", line 531, column 1: pillar_roots:base:- /srv/pillar ^ could not found expected ':' in "<string>", line 532, column 1: # ^ [ERROR ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key in "<string>", line 531, column 1: pillar_roots:base:- /srv/pillar ^ could not found expected ':' in "<string>", line 532, column 1: # ^ This patch will fix it as such:: ID: salt-master Function: file.recurse Name: /etc/salt/master.d Result: True Comment: Recursively updated /etc/salt/master.d Started: 11:37:12.946823 Duration: 6255.296 ms Changes: ---------- /etc/salt/master.d/f_defaults.conf: ---------- diff: --- +++ @@ -528,7 +528,9 @@ # Pillar is laid out in the same fashion as the file server, with environments, # a top file and sls files. However, pillar data does not need to be in the # highstate format, and is generally just key/value pairs. -pillar_roots:base:- /srv/pillar +pillar_roots: + base: + - /srv/pillar # Resulting in:: # highstate format, and is generally just key/value pairs. pillar_roots: base: - /srv/pillar #
9 years ago
Fixed pillar_roots generation for salt-master. With a simple pillar like this:: $ sudo salt-call --config-dir /srv/etc/bootstrap --pillar-root /srv/pillar pillar.get salt:pillar_roots local: ---------- base: - /srv/pillar This was generated in /etc/salt/master.d/f_defaults.conf:: # highstate format, and is generally just key/value pairs. pillar_roots:base:- /srv/pillar # Resulting in parse errors by salt:: $ sudo salt '*' state.highstate [ERROR ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key in "<string>", line 531, column 1: pillar_roots:base:- /srv/pillar ^ could not found expected ':' in "<string>", line 532, column 1: # ^ [ERROR ] Error parsing configuration file: /etc/salt/master.d/f_defaults.conf - while scanning a simple key in "<string>", line 531, column 1: pillar_roots:base:- /srv/pillar ^ could not found expected ':' in "<string>", line 532, column 1: # ^ This patch will fix it as such:: ID: salt-master Function: file.recurse Name: /etc/salt/master.d Result: True Comment: Recursively updated /etc/salt/master.d Started: 11:37:12.946823 Duration: 6255.296 ms Changes: ---------- /etc/salt/master.d/f_defaults.conf: ---------- diff: --- +++ @@ -528,7 +528,9 @@ # Pillar is laid out in the same fashion as the file server, with environments, # a top file and sls files. However, pillar data does not need to be in the # highstate format, and is generally just key/value pairs. -pillar_roots:base:- /srv/pillar +pillar_roots: + base: + - /srv/pillar # Resulting in:: # highstate format, and is generally just key/value pairs. pillar_roots: base: - /srv/pillar #
9 years ago
9 years ago
11 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547
  1. # This file managed by Salt, do not edit by hand!!
  2. # Based on salt version 2015.8.7 default config
  3. {% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs', 'engines', 'lxc.network_profile', 'lxc.container_profile'] -%}
  4. {% set cfg_salt = pillar.get('salt', {}) -%}
  5. {% set cfg_master = cfg_salt.get('master', {}) -%}
  6. {% set default_keys = [] -%}
  7. {%- macro get_config(configname, default_value) -%}
  8. {%- do default_keys.append(configname) %}
  9. {%- if configname in cfg_master -%}
  10. {{ configname }}: {{ cfg_master[configname]|json }}
  11. {%- elif configname in cfg_salt and configname not in reserved_keys -%}
  12. {{ configname }}: {{ cfg_salt[configname]|json }}
  13. {%- else -%}
  14. #{{ configname }}: {{ default_value|json }}
  15. {%- endif -%}
  16. {%- endmacro -%}
  17. {%- from 'salt/formulas.jinja' import file_roots, formulas with context -%}
  18. ##### Primary configuration settings #####
  19. ##########################################
  20. # This configuration file is used to manage the behavior of the Salt Master.
  21. # Values that are commented out but have an empty line after the comment are
  22. # defaults that do not need to be set in the config. If there is no blank line
  23. # after the comment then the value is presented as an example and is not the
  24. # default.
  25. # The id to be passed in the publish job to minions.
  26. # This is used for MultiSyndics to return the job to the requesting master.
  27. # This must be the same string as the syndic is configured with.
  28. # master_id: None
  29. {{ get_config('master_id', 'None') }}
  30. # Per default, the master will automatically include all config files
  31. # from master.d/*.conf (master.d is a directory in the same directory
  32. # as the main master config file).
  33. {{ get_config('default_include', 'master.d/*.conf') }}
  34. # The address of the interface to bind to:
  35. {{ get_config('interface', '0.0.0.0') }}
  36. # Whether the master should listen for IPv6 connections. If this is set to True,
  37. # the interface option must be adjusted, too. (For example: "interface: '::'")
  38. {{ get_config('ipv6', 'False') }}
  39. # The tcp port used by the publisher:
  40. {{ get_config('publish_port', '4505') }}
  41. # The user under which the salt master will run. Salt will update all
  42. # permissions to allow the specified user to run the master. The exception is
  43. # the job cache, which must be deleted if this user is changed. If the
  44. # modified files cause conflicts, set verify_env to False.
  45. {{ get_config('user', 'root') }}
  46. # The port used by the communication interface. The ret (return) port is the
  47. # interface used for the file server, authentication, job returns, etc.
  48. {{ get_config('ret_port', '4506') }}
  49. # Specify the location of the daemon process ID file:
  50. {{ get_config('pidfile', '/var/run/salt-master.pid') }}
  51. # The root directory prepended to these options: pki_dir, cachedir,
  52. # sock_dir, log_file, autosign_file, autoreject_file, extension_modules,
  53. # key_logfile, pidfile:
  54. {{ get_config('root_dir', '/') }}
  55. # Directory used to store public key data:
  56. {{ get_config('pki_dir', '/etc/salt/pki/master') }}
  57. # Directory to store job and cache data:
  58. # This directory may contain sensitive data and should be protected accordingly.
  59. #
  60. {{ get_config('cachedir', '/var/cache/salt/master') }}
  61. # Directory for custom modules. This directory can contain subdirectories for
  62. # each of Salt's module types such as "runners", "output", "wheel", "modules",
  63. # "states", "returners", etc.
  64. {{ get_config('extension_modules', '<no default>') }}
  65. # Directory for custom modules. This directory can contain subdirectories for
  66. # each of Salt's module types such as "runners", "output", "wheel", "modules",
  67. # "states", "returners", etc.
  68. # Like 'extension_modules' but can take an array of paths
  69. {% if 'module_dirs' in cfg_master -%}
  70. {%- do default_keys.append('module_dirs') %}
  71. module_dirs:
  72. {%- for dir in cfg_master['module_dirs'] %}
  73. - {{ dir}}
  74. {%- endfor -%}
  75. {% elif 'module_dirs' in cfg_salt -%}
  76. module_dirs:
  77. {%- for dir in cfg_salt['module_dirs'] %}
  78. - {{ dir}}
  79. {%- endfor -%}
  80. {% else -%}
  81. #module_dirs: <no default>
  82. # - /var/cache/salt/minion/extmods
  83. {% endif %}
  84. # Verify and set permissions on configuration directories at startup:
  85. {{ get_config('verify_env', 'True') }}
  86. # Set the number of hours to keep old job information in the job cache:
  87. {{ get_config('keep_jobs', '24') }}
  88. # Set the default timeout for the salt command and api. The default is 5
  89. # seconds.
  90. {{ get_config('timeout', '5') }}
  91. # The loop_interval option controls the seconds for the master's maintenance
  92. # process check cycle. This process updates file server backends, cleans the
  93. # job cache and executes the scheduler.
  94. {{ get_config('loop_interval', '60') }}
  95. # Set the default outputter used by the salt command. The default is "nested".
  96. {{ get_config('output', 'nested') }}
  97. # Return minions that timeout when running commands like test.ping
  98. {{ get_config('show_timeout', 'True') }}
  99. # By default, output is colored. To disable colored output, set the color value
  100. # to False.
  101. {{ get_config('color', 'True') }}
  102. # Do not strip off the colored output from nested results and state outputs
  103. # (true by default).
  104. {{ get_config('strip_colors', 'False') }}
  105. # Set the directory used to hold unix sockets:
  106. {{ get_config('sock_dir', '/var/run/salt/master') }}
  107. # The master can take a while to start up when lspci and/or dmidecode is used
  108. # to populate the grains for the master. Enable if you want to see GPU hardware
  109. # data for your master.
  110. {{ get_config('enable_gpu_grains', 'False') }}
  111. # The master maintains a job cache. While this is a great addition, it can be
  112. # a burden on the master for larger deployments (over 5000 minions).
  113. # Disabling the job cache will make previously executed jobs unavailable to
  114. # the jobs system and is not generally recommended.
  115. {{ get_config('job_cache', 'True') }}
  116. # Cache minion grains and pillar data in the cachedir.
  117. {{ get_config('minion_data_cache', 'True') }}
  118. # Store all returns in the given returner.
  119. # Setting this option requires that any returner-specific configuration also
  120. # be set. See various returners in salt/returners for details on required
  121. # configuration values. (See also, event_return_queue below.)
  122. {{ get_config('event_return', 'mysql') }}
  123. # On busy systems, enabling event_returns can cause a considerable load on
  124. # the storage system for returners. Events can be queued on the master and
  125. # stored in a batched fashion using a single transaction for multiple events.
  126. # By default, events are not queued.
  127. {{ get_config('event_return_queue', '0') }}
  128. # Only events returns matching tags in a whitelist
  129. {% if 'event_return_whitelist' in cfg_master -%}
  130. {%- do default_keys.append('event_return_whitelist') %}
  131. event_return_whitelist:
  132. {%- for event_return in cfg_master['event_return_whitelist'] %}
  133. - {{ event_return }}
  134. {%- endfor -%}
  135. {% elif 'event_return_whitelist' in cfg_salt -%}
  136. event_return_whitelist:
  137. {%- for event_return in cfg_salt['event_return_whitelist'] %}
  138. - {{ event_return }}
  139. {%- endfor -%}
  140. {% else -%}
  141. # event_return_whitelist:
  142. # - salt/master/a_tag
  143. # - salt/master/another_tag
  144. {% endif %}
  145. # Store all event returns _except_ the tags in a blacklist
  146. {% if 'event_return_blacklist' in cfg_master -%}
  147. {%- do default_keys.append('event_return_blacklist') %}
  148. event_return_blacklist:
  149. {%- for event_return in cfg_master['event_return_blacklist'] %}
  150. - {{ event_return }}
  151. {%- endfor -%}
  152. {% elif 'event_return_blacklist' in cfg_salt -%}
  153. event_return_blacklist:
  154. {%- for event_return in cfg_salt['event_return_blacklist'] %}
  155. - {{ event_return }}
  156. {%- endfor -%}
  157. {% else -%}
  158. # event_return_blacklist:
  159. # - salt/master/not_this_tag
  160. # - salt/master/or_this_one
  161. {% endif %}
  162. # Passing very large events can cause the minion to consume large amounts of
  163. # memory. This value tunes the maximum size of a message allowed onto the
  164. # master event bus. The value is expressed in bytes.
  165. {{ get_config('max_event_size', '1048576') }}
  166. # By default, the master AES key rotates every 24 hours. The next command
  167. # following a key rotation will trigger a key refresh from the minion which may
  168. # result in minions which do not respond to the first command after a key refresh.
  169. #
  170. # To tell the master to ping all minions immediately after an AES key refresh, set
  171. # ping_on_rotate to True. This should mitigate the issue where a minion does not
  172. # appear to initially respond after a key is rotated.
  173. #
  174. # Note that ping_on_rotate may cause high load on the master immediately after
  175. # the key rotation event as minions reconnect. Consider this carefully if this
  176. # salt master is managing a large number of minions.
  177. #
  178. # If disabled, it is recommended to handle this event by listening for the
  179. # 'aes_key_rotate' event with the 'key' tag and acting appropriately.
  180. {{ get_config('ping_on_rotate', 'False') }}
  181. # By default, the master deletes its cache of minion data when the key for that
  182. # minion is removed. To preserve the cache after key deletion, set
  183. # 'preserve_minion_cache' to True.
  184. #
  185. # WARNING: This may have security implications if compromised minions auth with
  186. # a previous deleted minion ID.
  187. {{ get_config('preserve_minion_cache', 'False') }}
  188. # If max_minions is used in large installations, the master might experience
  189. # high-load situations because of having to check the number of connected
  190. # minions for every authentication. This cache provides the minion-ids of
  191. # all connected minions to all MWorker-processes and greatly improves the
  192. # performance of max_minions.
  193. {{ get_config('con_cache', 'False') }}
  194. # The master can include configuration from other files. To enable this,
  195. # pass a list of paths to this option. The paths can be either relative or
  196. # absolute; if relative, they are considered to be relative to the directory
  197. # the main master configuration file lives in (this file). Paths can make use
  198. # of shell-style globbing. If no files are matched by a path passed to this
  199. # option, then the master will log a warning message.
  200. #
  201. # Include a config file from some other path:
  202. # include: /etc/salt/extra_config
  203. #
  204. # Include config from several files and directories:
  205. # include:
  206. # - /etc/salt/extra_config
  207. {{ get_config('include', '[]') }}
  208. ##### Large-scale tuning settings #####
  209. ##########################################
  210. # Max open files
  211. #
  212. # Each minion connecting to the master uses AT LEAST one file descriptor, the
  213. # master subscription connection. If enough minions connect you might start
  214. # seeing on the console (and then salt-master crashes):
  215. # Too many open files (tcp_listener.cpp:335)
  216. # Aborted (core dumped)
  217. #
  218. # By default this value will be the one of `ulimit -Hn`, ie, the hard limit for
  219. # max open files.
  220. #
  221. # If you wish to set a different value than the default one, uncomment and
  222. # configure this setting. Remember that this value CANNOT be higher than the
  223. # hard limit. Raising the hard limit depends on your OS and/or distribution,
  224. # a good way to find the limit is to search the internet. For example:
  225. # raise max open files hard limit debian
  226. #
  227. {{ get_config('max_open_files', '100000') }}
  228. # The number of worker threads to start. These threads are used to manage
  229. # return calls made from minions to the master. If the master seems to be
  230. # running slowly, increase the number of threads. This setting can not be
  231. # set lower than 3.
  232. {{ get_config('worker_threads', '5') }}
  233. # Set the ZeroMQ high water marks
  234. # http://api.zeromq.org/3-2:zmq-setsockopt
  235. # The publisher interface ZeroMQPubServerChannel
  236. {{ get_config('pub_hwm', '1000') }}
  237. # These two ZMQ HWM settings, salt_event_pub_hwm and event_publisher_pub_hwm
  238. # are significant for masters with thousands of minions. When these are
  239. # insufficiently high it will manifest in random responses missing in the CLI
  240. # and even missing from the job cache. Masters that have fast CPUs and many
  241. # cores with appropriate worker_threads will not need these set as high.
  242. # On deployment with 8,000 minions, 2.4GHz CPUs, 24 cores, 32GiB memory has
  243. # these settings:
  244. #
  245. # salt_event_pub_hwm: 128000
  246. # event_publisher_pub_hwm: 64000
  247. # ZMQ high-water-mark for SaltEvent pub socket
  248. {{ get_config('salt_event_pub_hwm', '20000') }}
  249. # ZMQ high-water-mark for EventPublisher pub socket
  250. {{ get_config('event_publisher_pub_hwm', '10000') }}
  251. ##### Security settings #####
  252. ##########################################
  253. # Enable "open mode", this mode still maintains encryption, but turns off
  254. # authentication, this is only intended for highly secure environments or for
  255. # the situation where your keys end up in a bad state. If you run in open mode
  256. # you do so at your own risk!
  257. {{ get_config('open_mode', 'False') }}
  258. # Enable auto_accept, this setting will automatically accept all incoming
  259. # public keys from the minions. Note that this is insecure.
  260. {{ get_config('auto_accept', 'False') }}
  261. # Time in minutes that a incoming public key with a matching name found in
  262. # pki_dir/minion_autosign/keyid is automatically accepted. Expired autosign keys
  263. # are removed when the master checks the minion_autosign directory.
  264. # 0 equals no timeout
  265. {{ get_config('autosign_timeout', '120') }}
  266. # If the autosign_file is specified, incoming keys specified in the
  267. # autosign_file will be automatically accepted. This is insecure. Regular
  268. # expressions as well as globing lines are supported.
  269. {{ get_config('autosign_file', '/etc/salt/autosign.conf') }}
  270. # Works like autosign_file, but instead allows you to specify minion IDs for
  271. # which keys will automatically be rejected. Will override both membership in
  272. # the autosign_file and the auto_accept setting.
  273. {{ get_config('autoreject_file', '/etc/salt/autoreject.conf') }}
  274. # Enable permissive access to the salt keys. This allows you to run the
  275. # master or minion as root, but have a non-root group be given access to
  276. # your pki_dir. To make the access explicit, root must belong to the group
  277. # you've given access to. This is potentially quite insecure. If an autosign_file
  278. # is specified, enabling permissive_pki_access will allow group access to that
  279. # specific file.
  280. {{ get_config('permissive_pki_access', 'False') }}
  281. # Allow users on the master access to execute specific commands on minions.
  282. # This setting should be treated with care since it opens up execution
  283. # capabilities to non root users. By default this capability is completely
  284. # disabled.
  285. {% if 'publisher_acl' in cfg_master -%}
  286. {%- do default_keys.append('publisher_acl') %}
  287. publisher_acl:
  288. {%- for name, user in cfg_master['publisher_acl']|dictsort %}
  289. {{ name}}:
  290. {%- for command in user %}
  291. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  292. {%- endfor -%}
  293. {%- endfor -%}
  294. {% elif 'publisher_acl' in cfg_salt -%}
  295. publisher_acl:
  296. {%- for name, user in cfg_salt['publisher_acl']|dictsort %}
  297. {{ name }}:
  298. {%- for command in user %}
  299. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  300. {%- endfor -%}
  301. {%- endfor -%}
  302. {% elif 'client_acl' in cfg_master -%}
  303. {%- do default_keys.append('client_acl') %}
  304. publisher_acl:
  305. {%- for name, user in cfg_master['client_acl']|dictsort %}
  306. {{ name}}:
  307. {%- for command in user %}
  308. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  309. {%- endfor -%}
  310. {%- endfor -%}
  311. {% elif 'client_acl' in cfg_salt -%}
  312. publisher_acl:
  313. {%- for name, user in cfg_salt['client_acl']|dictsort %}
  314. {{ name }}:
  315. {%- for command in user %}
  316. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  317. {%- endfor -%}
  318. {%- endfor -%}
  319. {% else -%}
  320. #publisher_acl:
  321. # larry:
  322. # - test.ping
  323. # - network.*
  324. {%- endif %}
  325. # Blacklist any of the following users or modules
  326. #
  327. # This example would blacklist all non sudo users, including root from
  328. # running any commands. It would also blacklist any use of the "cmd"
  329. # module. This is completely disabled by default.
  330. {% if 'publisher_acl_blacklist' in cfg_master %}
  331. {%- do default_keys.append('publisher_acl_blacklist') %}
  332. publisher_acl_blacklist:
  333. users:
  334. {% for user in cfg_master['publisher_acl_blacklist'].get('users', []) %}
  335. - {{ user }}
  336. {% endfor %}
  337. modules:
  338. {% for mod in cfg_master['publisher_acl_blacklist'].get('modules', []) %}
  339. - {{ mod }}
  340. {% endfor %}
  341. {% elif 'publisher_acl_blacklist' in cfg_salt %}
  342. publisher_acl_blacklist:
  343. users:
  344. {% for user in cfg_salt['publisher_acl_blacklist'].get('users', []) %}
  345. - {{ user }}
  346. {% endfor %}
  347. modules:
  348. {% for mod in cfg_salt['publisher_acl_blacklist'].get('modules', []) %}
  349. - {{ mod }}
  350. {% endfor %}
  351. {% elif 'client_acl_blacklist' in cfg_master %}
  352. {%- do default_keys.append('client_acl_blacklist') %}
  353. publisher_acl_blacklist:
  354. users:
  355. {% for user in cfg_master['client_acl_blacklist'].get('users', []) %}
  356. - {{ user }}
  357. {% endfor %}
  358. modules:
  359. {% for mod in cfg_master['client_acl_blacklist'].get('modules', []) %}
  360. - {{ mod }}
  361. {% endfor %}
  362. {% elif 'client_acl_blacklist' in cfg_salt %}
  363. publisher_acl_blacklist:
  364. users:
  365. {% for user in cfg_salt['client_acl_blacklist'].get('users', []) %}
  366. - {{ user }}
  367. {% endfor %}
  368. modules:
  369. {% for mod in cfg_salt['client_acl_blacklist'].get('modules', []) %}
  370. - {{ mod }}
  371. {% endfor %}
  372. {% else %}
  373. #publisher_acl_blacklist:
  374. # users:
  375. # - root
  376. # - '^(?!sudo_).*$' # all non sudo users
  377. # modules:
  378. # - cmd
  379. {% endif %}
  380. # Enforce publisher_acl & publisher_acl_blacklist when users have sudo
  381. # access to the salt command.
  382. {{ get_config('sudo_acl', 'False') }}
  383. # The external auth system uses the Salt auth modules to authenticate and
  384. # validate users to access areas of the Salt system.
  385. #external_auth:
  386. # pam:
  387. # fred:
  388. # - test.*
  389. {%- if 'external_auth' in cfg_master %}
  390. {%- do default_keys.append('external_auth') %}
  391. external_auth:
  392. {%- for auth, users in cfg_master['external_auth']|dictsort %}
  393. {{ auth }}:
  394. {%- for user, commands in users.iteritems() %}
  395. {{ user }}:
  396. {%- for command in commands %}
  397. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  398. {%- endfor -%}
  399. {%- endfor -%}
  400. {%- endfor -%}
  401. {%- endif %}
  402. # Time (in seconds) for a newly generated token to live. Default: 12 hours
  403. {{ get_config('token_expire', '43200') }}
  404. # Allow minions to push files to the master. This is disabled by default, for
  405. # security purposes.
  406. {{ get_config('file_recv', 'False') }}
  407. # Set a hard-limit on the size of the files that can be pushed to the master.
  408. # It will be interpreted as megabytes. Default: 100
  409. {{ get_config('file_recv_max_size', '100') }}
  410. # Signature verification on messages published from the master.
  411. # This causes the master to cryptographically sign all messages published to its event
  412. # bus, and minions then verify that signature before acting on the message.
  413. #
  414. # This is False by default.
  415. #
  416. # Note that to facilitate interoperability with masters and minions that are different
  417. # versions, if sign_pub_messages is True but a message is received by a minion with
  418. # no signature, it will still be accepted, and a warning message will be logged.
  419. # Conversely, if sign_pub_messages is False, but a minion receives a signed
  420. # message it will be accepted, the signature will not be checked, and a warning message
  421. # will be logged. This behavior went away in Salt 2014.1.0 and these two situations
  422. # will cause minion to throw an exception and drop the message.
  423. {{ get_config('sign_pub_message', 'False') }}
  424. # Sign the master auth-replies with a cryptographic signature of the masters public key.
  425. # Please see the tutorial how to use these settings in the Multimaster-PKI with Failover Tutorial
  426. {{ get_config('master_sign_pubkey', 'False') }}
  427. # The customizable name of the signing-key-pair without suffix.
  428. # master_sign_key_name: <filename_without_suffix>
  429. {{ get_config('master_sign', '{}') }}
  430. # The name of the file in the masters pki-directory that holds the pre-calculated
  431. # signature of the masters public-key.
  432. # master_pubkey_signature: <filename>
  433. {{ get_config('master_pubkey_signature', '{}') }}
  434. # Instead of computing the signature for each auth-reply, use a pre-calculated signature.
  435. # The master_pubkey_signature must also be set for this.
  436. {{ get_config('master_use_pubkey_signature', 'False') }}
  437. # Rotate the salt-masters AES-key when a minion-public is deleted with salt-key.
  438. # This is a very important security-setting. Disabling it will enable deleted minions to still
  439. # listen in on the messages published by the salt-master.
  440. # Do not disable this unless it is absolutely clear what this does.
  441. {{ get_config('rotate_aes_key', 'True') }}
  442. # Unique ID attribute name for the user. For Active Directory should be set
  443. # to 'sAMAccountName'. Default value is 'memberUid'.
  444. {{ get_config('auth.ldap.accountattributename', 'memberUid') }}
  445. # Set this to True if LDAP is Active Directory. Default is False
  446. {{ get_config('auth.ldap.activedirectory', False) }}
  447. # Bind to LDAP anonymously to determine group membership
  448. # Active Directory does not allow anonymous binds without special configuration
  449. {{ get_config('auth.ldap.anonymous', False) }}
  450. # The base DN under which users can be found in LDAP
  451. {{ get_config('auth.ldap.basedn', '') }}
  452. # The user Salt authenticates to search for a users' Distinguished Name and
  453. # group membership.
  454. {{ get_config('auth.ldap.binddn', '') }}
  455. # The bind password to go along with the bind dn (binddn).
  456. {{ get_config('auth.ldap.bindpw', '') }}
  457. # The filter used to find the DN associated with a user. For most LDAPs use
  458. # the value {% raw %}'uid={{ username }}'{% endraw %}. For Active Directory use the value
  459. # {% raw %}'sAMAccountName={{username}}'{% endraw %}.
  460. {{ get_config('auth.ldap.filter', '') }}
  461. # The attribute used for user group membership. Defaults to 'memberOf'
  462. {{ get_config('auth.ldap.groupattribute', 'memberOf') }}
  463. # LDAP group class. Use 'group' for Active Directory. Defaults to 'posixGroup'
  464. {{ get_config('auth.ldap.groupclass', 'posixGroup') }}
  465. # To specify an OU that contains group data. Not used for Active Directory
  466. # Default value: 'Groups'
  467. {{ get_config('auth.ldap.groupou', 'Groups') }}
  468. # Allows the administrator to strip off a certain set of domain names
  469. # so the hostnames looked up in the directory service can match the minion IDs.
  470. {{ get_config('auth.ldap.minion_stripdomains', []) }}
  471. # Verify server's TLS certificate. Default value: False
  472. {{ get_config('auth.ldap.no_verify', False) }}
  473. # Only for Active Directory. Default value: 'person'
  474. {{ get_config('auth.ldap.persontype', 'person') }}
  475. # Port to connect via. Default value: '389'
  476. {{ get_config('auth.ldap.port', '389') }}
  477. # LDAP scope level, almost always 2. Default value: 2
  478. {{ get_config('auth.ldap.scope', 2) }}
  479. # Server to auth against. Default value: 'localhost'
  480. {{ get_config('auth.ldap.server', 'localhost') }}
  481. # Use TLS when connecting. Default value: False
  482. {{ get_config('auth.ldap.tls', False) }}
  483. # Server specified in URI format. Overrides .ldap.server, .ldap.port,
  484. # .ldap.tls. Default value: ''
  485. {{ get_config('auth.ldap.uri', '') }}
  486. ##### Salt-SSH Configuration #####
  487. ##########################################
  488. # Pass in an alternative location for the salt-ssh roster file
  489. {{ get_config('roster_file', '/etc/salt/roster') }}
  490. # Pass in minion option overrides that will be inserted into the SHIM for
  491. # salt-ssh calls. The local minion config is not used for salt-ssh. Can be
  492. # overridden on a per-minion basis in the roster (`minion_opts`)
  493. #ssh_minion_opts:
  494. # gpg_keydir: /root/gpg
  495. {{ get_config('ssh_minion_opts', '{}') }}
  496. ##### Master Module Management #####
  497. ##########################################
  498. # Manage how master side modules are loaded.
  499. # Add any additional locations to look for master runners:
  500. {{ get_config('runner_dirs', '[]') }}
  501. # Enable Cython for master side modules:
  502. {{ get_config('cython_enable', 'False') }}
  503. ##### State System settings #####
  504. ##########################################
  505. # The state system uses a "top" file to tell the minions what environment to
  506. # use and what modules to use. The state_top file is defined relative to the
  507. # root of the base environment as defined in "File Server settings" below.
  508. {{ get_config('state_top', 'top.sls') }}
  509. # The master_tops option replaces the external_nodes option by creating
  510. # a plugable system for the generation of external top data. The external_nodes
  511. # option is deprecated by the master_tops option.
  512. #
  513. # To gain the capabilities of the classic external_nodes system, use the
  514. # following configuration:
  515. # master_tops:
  516. # ext_nodes: <Shell command which returns yaml>
  517. #
  518. #master_tops: {}
  519. {% if 'master_tops' in cfg_master %}
  520. {%- do default_keys.append('master_tops') %}
  521. master_tops:
  522. {%- for master in cfg_master['master_tops'] -%}
  523. {%- if cfg_master['master_tops'][master] is string %}
  524. {{ master }}: {{ cfg_master['master_tops'][master] }}
  525. {%- else %}
  526. {{ master}}:
  527. {%- for parameter in cfg_master['master_tops'][master] %}
  528. {{ parameter }}: {{ cfg_master['master_tops'][master][parameter] }}
  529. {%- endfor -%}
  530. {%- endif -%}
  531. {%- endfor %}
  532. {% endif %}
  533. # The external_nodes option allows Salt to gather data that would normally be
  534. # placed in a top file. The external_nodes option is the executable that will
  535. # return the ENC data. Remember that Salt will look for external nodes AND top
  536. # files and combine the results if both are enabled!
  537. {{ get_config('external_nodes', 'None') }}
  538. # The renderer to use on the minions to render the state data
  539. {{ get_config('renderer', 'yaml_jinja') }}
  540. # The Jinja renderer can strip extra carriage returns and whitespace
  541. # See http://jinja.pocoo.org/docs/api/#high-level-api
  542. #
  543. # If this is set to True the first newline after a Jinja block is removed
  544. # (block, not variable tag!). Defaults to False, corresponds to the Jinja
  545. # environment init variable "trim_blocks".
  546. {{ get_config('jinja_trim_blocks', 'False') }}
  547. # If this is set to True leading spaces and tabs are stripped from the start
  548. # of a line to a block. Defaults to False, corresponds to the Jinja
  549. # environment init variable "lstrip_blocks".
  550. {{ get_config('jinja_lstrip_blocks', 'False') }}
  551. # The failhard option tells the minions to stop immediately after the first
  552. # failure detected in the state execution, defaults to False
  553. {{ get_config('failhard', 'False') }}
  554. # The state_verbose and state_output settings can be used to change the way
  555. # state system data is printed to the display. By default all data is printed.
  556. # The state_verbose setting can be set to True or False, when set to False
  557. # all data that has a result of True and no changes will be suppressed.
  558. {{ get_config('state_verbose', 'True') }}
  559. # The state_output setting changes if the output is the full multi line
  560. # output for each changed state if set to 'full', but if set to 'terse'
  561. # the output will be shortened to a single line. If set to 'mixed', the output
  562. # will be terse unless a state failed, in which case that output will be full.
  563. # If set to 'changes', the output will be full unless the state didn't change.
  564. {{ get_config('state_output', 'full') }}
  565. # Automatically aggregate all states that have support for mod_aggregate by
  566. # setting to 'True'. Or pass a list of state module names to automatically
  567. # aggregate just those types.
  568. #
  569. # state_aggregate:
  570. # - pkg
  571. #
  572. #state_aggregate: False
  573. {{ get_config('state_aggregate', '{}') }}
  574. # Send progress events as each function in a state run completes execution
  575. # by setting to 'True'. Progress events are in the format
  576. # 'salt/job/<JID>/prog/<MID>/<RUN NUM>'.
  577. {{ get_config('state_events', 'False') }}
  578. # Enable extra routines for YAML renderer used states containing UTF characters.
  579. {{ get_config('yaml_utf8', 'False') }}
  580. ##### File Server settings #####
  581. ##########################################
  582. # Salt runs a lightweight file server written in zeromq to deliver files to
  583. # minions. This file server is built into the master daemon and does not
  584. # require a dedicated port.
  585. # The file server works on environments passed to the master, each environment
  586. # can have multiple root directories, the subdirectories in the multiple file
  587. # roots cannot match, otherwise the downloaded files will not be able to be
  588. # reliably ensured. A base environment is required to house the top file.
  589. # Example:
  590. # file_roots:
  591. # base:
  592. # - /srv/salt/
  593. # dev:
  594. # - /srv/salt/dev/services
  595. # - /srv/salt/dev/states
  596. # prod:
  597. # - /srv/salt/prod/services
  598. # - /srv/salt/prod/states
  599. #
  600. {% if 'file_roots' in cfg_master -%}
  601. {%- do default_keys.append('file_roots') %}
  602. {{ file_roots(cfg_master['file_roots']) }}
  603. {%- elif 'file_roots' in cfg_salt -%}
  604. {{ file_roots(cfg_salt['file_roots']) }}
  605. {%- elif formulas|length -%}
  606. {{ file_roots({'base': ['/srv/salt']}) }}
  607. {%- else -%}
  608. #file_roots:
  609. # base:
  610. # - /srv/salt
  611. {%- endif %}
  612. # When using multiple environments, each with their own top file, the
  613. # default behaviour is an unordered merge. To prevent top files from
  614. # being merged together and instead to only use the top file from the
  615. # requested environment, set this value to 'same'.
  616. {{ get_config('top_file_merging_strategy', 'merge') }}
  617. # To specify the order in which environments are merged, set the ordering
  618. # in the env_order option. Given a conflict, the last matching value will
  619. # win.
  620. {{ get_config('env_order', '["base", "dev", "prod"]') }}
  621. # If top_file_merging_strategy is set to 'same' and an environment does not
  622. # contain a top file, the top file in the environment specified by default_top
  623. # will be used instead.
  624. {{ get_config('default_top', 'base') }}
  625. # The hash_type is the hash to use when discovering the hash of a file on
  626. # the master server. The default is md5, but sha1, sha224, sha256, sha384
  627. # and sha512 are also supported.
  628. #
  629. # Prior to changing this value, the master should be stopped and all Salt
  630. # caches should be cleared.
  631. {{ get_config('hash_type', 'md5') }}
  632. # The buffer size in the file server can be adjusted here:
  633. {{ get_config('file_buffer_size', '1048576') }}
  634. # A regular expression (or a list of expressions) that will be matched
  635. # against the file path before syncing the modules and states to the minions.
  636. # This includes files affected by the file.recurse state.
  637. # For example, if you manage your custom modules and states in subversion
  638. # and don't want all the '.svn' folders and content synced to your minions,
  639. # you could set this to '/\.svn($|/)'. By default nothing is ignored.
  640. {% if 'file_ignore_regex' in cfg_master %}
  641. {%- do default_keys.append('file_ignore_regex') %}
  642. file_ignore_regex:
  643. {% for regex in cfg_master['file_ignore_regex'] %}
  644. - {{ regex }}
  645. {% endfor %}
  646. {% elif 'file_ignore_regex' in cfg_salt %}
  647. file_ignore_regex:
  648. {% for regex in cfg_salt['file_ignore_regex'] %}
  649. - {{ regex }}
  650. {% endfor %}
  651. {% else %}
  652. #file_ignore_regex:
  653. # - '/\.svn($|/)'
  654. # - '/\.git($|/)'
  655. {% endif %}
  656. # A file glob (or list of file globs) that will be matched against the file
  657. # path before syncing the modules and states to the minions. This is similar
  658. # to file_ignore_regex above, but works on globs instead of regex. By default
  659. # nothing is ignored.
  660. {% if 'file_ignore_glob' in cfg_master %}
  661. {%- do default_keys.append('file_ignore_glob') %}
  662. file_ignore_glob:
  663. {% for glob in cfg_master['file_ignore_glob'] %}
  664. - {{ glob }}
  665. {% endfor %}
  666. {% elif 'file_ignore_glob' in cfg_salt %}
  667. file_ignore_glob:
  668. {% for glob in cfg_salt['file_ignore_glob'] %}
  669. - {{ glob }}
  670. {% endfor %}
  671. {% else %}
  672. # file_ignore_glob:
  673. # - '*.pyc'
  674. # - '*/somefolder/*.bak'
  675. # - '*.swp'
  676. {% endif %}
  677. # File Server Backend
  678. #
  679. # Salt supports a modular fileserver backend system, this system allows
  680. # the salt master to link directly to third party systems to gather and
  681. # manage the files available to minions. Multiple backends can be
  682. # configured and will be searched for the requested file in the order in which
  683. # they are defined here. The default setting only enables the standard backend
  684. # "roots" which uses the "file_roots" option.
  685. #fileserver_backend:
  686. # - roots
  687. #
  688. # To use multiple backends list them in the order they are searched:
  689. #fileserver_backend:
  690. # - git
  691. # - roots
  692. {% if 'fileserver_backend' in cfg_master -%}
  693. {%- do default_keys.append('fileserver_backend') %}
  694. fileserver_backend:
  695. {%- for backend in cfg_master['fileserver_backend'] %}
  696. - {{ backend }}
  697. {%- endfor -%}
  698. {%- endif %}
  699. # Uncomment the line below if you do not want the file_server to follow
  700. # symlinks when walking the filesystem tree. This is set to True
  701. # by default. Currently this only applies to the default roots
  702. # fileserver_backend.
  703. {{ get_config('fileserver_followsymlinks', 'False') }}
  704. # Uncomment the line below if you do not want symlinks to be
  705. # treated as the files they are pointing to. By default this is set to
  706. # False. By uncommenting the line below, any detected symlink while listing
  707. # files on the Master will not be returned to the Minion.
  708. {{ get_config('fileserver_ignoresymlinks', 'True') }}
  709. # By default, the Salt fileserver recurses fully into all defined environments
  710. # to attempt to find files. To limit this behavior so that the fileserver only
  711. # traverses directories with SLS files and special Salt directories like _modules,
  712. # enable the option below. This might be useful for installations where a file root
  713. # has a very large number of files and performance is impacted. Default is False.
  714. {{ get_config('fileserver_limit_traversal', 'False') }}
  715. # The fileserver can fire events off every time the fileserver is updated,
  716. # these are disabled by default, but can be easily turned on by setting this
  717. # flag to True
  718. {{ get_config('fileserver_events', 'False') }}
  719. # Git File Server Backend Configuration
  720. #
  721. # Optional parameter used to specify the provider to be used for gitfs. Must
  722. # be one of the following: pygit2, gitpython, or dulwich. If unset, then each
  723. # will be tried in that same order, and the first one with a compatible
  724. # version installed will be the provider that is used.
  725. {{ get_config('gitfs_provider', 'pygit2') }}
  726. # Along with gitfs_password, is used to authenticate to HTTPS remotes.
  727. {{ get_config('gitfs_user', 'git') }}
  728. # Along with gitfs_user, is used to authenticate to HTTPS remotes.
  729. # This parameter is not required if the repository does not use authentication.
  730. {{ get_config('gitfs_password', '') }}
  731. # By default, Salt will not authenticate to an HTTP (non-HTTPS) remote.
  732. # This parameter enables authentication over HTTP. Enable this at your own risk.
  733. {{ get_config('gitfs_insecure_auth', 'False') }}
  734. # Along with gitfs_privkey (and optionally gitfs_passphrase), is used to
  735. # authenticate to SSH remotes. This parameter (or its per-remote counterpart)
  736. # is required for SSH remotes.
  737. {{ get_config('gitfs_pubkey', '') }}
  738. # Along with gitfs_pubkey (and optionally gitfs_passphrase), is used to
  739. # authenticate to SSH remotes. This parameter (or its per-remote counterpart)
  740. # is required for SSH remotes.
  741. {{ get_config('gitfs_privkey', '') }}
  742. # This parameter is optional, required only when the SSH key being used to
  743. # authenticate is protected by a passphrase.
  744. {{ get_config('gitfs_passphrase', '') }}
  745. # When using the git fileserver backend at least one git remote needs to be
  746. # defined. The user running the salt master will need read access to the repo.
  747. #
  748. # The repos will be searched in order to find the file requested by a client
  749. # and the first repo to have the file will return it.
  750. # When using the git backend branches and tags are translated into salt
  751. # environments.
  752. # Note: file:// repos will be treated as a remote, so refs you want used must
  753. # exist in that repo as *local* refs.
  754. {% if 'gitfs_remotes' in cfg_master -%}
  755. {%- do default_keys.append('gitfs_remotes') %}
  756. gitfs_remotes:
  757. {%- for remote in cfg_master['gitfs_remotes'] %}
  758. {%- if remote is iterable and remote is not string %}
  759. {%- for repo, children in remote.items() %}
  760. - {{ repo }}:
  761. {%- for child in children %}
  762. {%- for key, value in child.items() %}
  763. - {{ key }}: {{ value }}
  764. {%- endfor -%}
  765. {%- endfor -%}
  766. {%- endfor -%}
  767. {%- else %}
  768. - {{ remote }}
  769. {%- endif -%}
  770. {%- endfor -%}
  771. {%- endif %}
  772. #gitfs_remotes:
  773. # - git://github.com/saltstack/salt-states.git
  774. # - file:///var/git/saltmaster
  775. #
  776. # The gitfs_ssl_verify option specifies whether to ignore ssl certificate
  777. # errors when contacting the gitfs backend. You might want to set this to
  778. # false if you're using a git backend that uses a self-signed certificate but
  779. # keep in mind that setting this flag to anything other than the default of True
  780. # is a security concern, you may want to try using the ssh transport.
  781. {{ get_config('gitfs_ssl_verify', 'True') }}
  782. # The gitfs_root option gives the ability to serve files from a subdirectory
  783. # within the repository. The path is defined relative to the root of the
  784. # repository and defaults to the repository root.
  785. {{ get_config('gitfs_root', 'somefolder/otherfolder') }}
  786. # The gitfs_env_whitelist and gitfs_env_blacklist parameters allow for greater
  787. # control over which branches/tags are exposed as fileserver environments.
  788. {% if 'gitfs_env_whitelist' in cfg_master -%}
  789. {%- do default_keys.append('gitfs_env_whitelist') %}
  790. gitfs_env_whitelist:
  791. {%- for git_env in cfg_master['gitfs_env_whitelist'] %}
  792. - {{ git_env }}
  793. {%- endfor -%}
  794. {% else -%}
  795. # gitfs_env_whitelist:
  796. # - base
  797. # - v1.*
  798. {% endif %}
  799. {% if 'gitfs_env_blacklist' in cfg_master -%}
  800. {%- do default_keys.append('gitfs_env_blacklist') %}
  801. gitfs_env_blacklist:
  802. {%- for git_env in cfg_master['gitfs_env_blacklist'] %}
  803. - {{ git_env }}
  804. {%- endfor -%}
  805. {% else -%}
  806. # gitfs_env_blacklist:
  807. # - bug/*
  808. # - feature/*
  809. {% endif %}
  810. # S3 File Server Backend Configuration
  811. #
  812. # S3 credentials must be set in the master config file.
  813. # Alternatively, if on EC2 these credentials can be automatically
  814. # loaded from instance metadata.
  815. {% if 's3.keyid' in cfg_master -%}
  816. {{ get_config('s3.keyid', '<no default>') }}
  817. {{ get_config('s3.key', '<no default>') }}
  818. {% else -%}
  819. # s3.keyid: GKTADJGHEIQSXMKKRBJ08H
  820. # s3.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
  821. {% endif %}
  822. # This fileserver supports two modes of operation for the buckets:
  823. # - A single bucket per environment
  824. # - Multiple environments per bucket
  825. #
  826. # Note that bucket names must be all lowercase both in the AWS console
  827. # and in Salt, otherwise you may encounter SignatureDoesNotMatch
  828. # errors.
  829. #
  830. # A multiple-environment bucket must adhere to the following root
  831. # directory structure:
  832. #
  833. # s3://<bucket name>/<environment>/<files>
  834. #
  835. # This fileserver back-end requires the use of the MD5 hashing
  836. # algorithm. MD5 may not be compliant with all security policies.
  837. {% if 's3.buckets' in cfg_master -%}
  838. {{ get_config('s3.buckets', '<no default>') }}
  839. {% else -%}
  840. # s3.buckets: #single bucket per environment
  841. # production:
  842. # - bucket1
  843. # - bucket2
  844. # staging:
  845. # - bucket3
  846. # - bucket4
  847. #
  848. # s3.buckets: #multiple environments per bucket
  849. # - bucket1
  850. # - bucket2
  851. # - bucket3
  852. # - bucket4
  853. {% endif %}
  854. ##### Pillar settings #####
  855. ##########################################
  856. # Salt Pillars allow for the building of global data that can be made selectively
  857. # available to different minions based on minion grain filtering. The Salt
  858. # Pillar is laid out in the same fashion as the file server, with environments,
  859. # a top file and sls files. However, pillar data does not need to be in the
  860. # highstate format, and is generally just key/value pairs.
  861. {% if 'pillar_roots' in cfg_master -%}
  862. {%- do default_keys.append('pillar_roots') %}
  863. pillar_roots:
  864. {%- for name, roots in cfg_master['pillar_roots']|dictsort %}
  865. {{ name }}:
  866. {%- for dir in roots %}
  867. - {{ dir }}
  868. {%- endfor -%}
  869. {%- endfor -%}
  870. {% elif 'pillar_roots' in cfg_salt -%}
  871. pillar_roots:
  872. {%- for name, roots in cfg_salt['pillar_roots']|dictsort %}
  873. {{ name }}:
  874. {%- for dir in roots %}
  875. - {{ dir }}
  876. {%- endfor -%}
  877. {%- endfor -%}
  878. {%- else -%}
  879. #pillar_roots:
  880. # base:
  881. # - /srv/pillar
  882. {%- endif %}
  883. {% if 'ext_pillar' in cfg_master %}
  884. {%- do default_keys.append('ext_pillar') %}
  885. ext_pillar:
  886. {%- for pillar in cfg_master['ext_pillar'] -%}
  887. {%- for key in pillar -%}
  888. {%- if pillar[key] is string %}
  889. - {{ key }}: {{ pillar[key] }}
  890. {#- Workaround for missing `is mapping` on CentOS 6, see #193: #}
  891. {%- elif pillar[key] is iterable and 'dict' not in pillar[key].__class__.__name__ %}
  892. - {{ key }}:
  893. {%- for parameter in pillar[key] %}
  894. - {{ parameter }}
  895. {%- endfor -%}
  896. {#- Workaround for missing `is mapping` on CentOS 6, see #193: #}
  897. {%- elif 'dict' in pillar[key].__class__.__name__ and pillar[key] is not string %}
  898. - {{ key }}:
  899. {%- for parameter in pillar[key] %}
  900. {{ parameter }}: {{pillar[key][parameter]}}
  901. {%- endfor %}
  902. {%- else %}
  903. # Error in rendering {{ key }}, please read https://docs.saltstack.com/en/latest/topics/development/external_pillars.html#configuration
  904. {% endif %}
  905. {%- endfor -%}
  906. {%- endfor %}
  907. {% elif 'ext_pillar' in cfg_salt %}
  908. ext_pillar:
  909. {% for pillar in cfg_salt['ext_pillar'] %}
  910. - {{ pillar.items()[0][0] }}: {{ pillar.items()[0][1] }}
  911. {% endfor %}
  912. {% else %}
  913. #ext_pillar:
  914. # - hiera: /etc/hiera.yaml
  915. # - cmd_yaml: cat /etc/salt/yaml
  916. {% endif %}
  917. # The ext_pillar_first option allows for external pillar sources to populate
  918. # before file system pillar. This allows for targeting file system pillar from
  919. # ext_pillar.
  920. {{ get_config('ext_pillar_first', 'False') }}
  921. # The pillar_gitfs_ssl_verify option specifies whether to ignore ssl certificate
  922. # errors when contacting the pillar gitfs backend. You might want to set this to
  923. # false if you're using a git backend that uses a self-signed certificate but
  924. # keep in mind that setting this flag to anything other than the default of True
  925. # is a security concern, you may want to try using the ssh transport.
  926. {{ get_config('pillar_gitfs_ssl_verify', 'True') }}
  927. # The pillar_opts option adds the master configuration file data to a dict in
  928. # the pillar called "master". This is used to set simple configurations in the
  929. # master config file that can then be used on minions.
  930. {{ get_config('pillar_opts', 'False') }}
  931. # The pillar_safe_render_error option prevents the master from passing pillar
  932. # render errors to the minion. This is set on by default because the error could
  933. # contain templating data which would give that minion information it shouldn't
  934. # have, like a password! When set true the error message will only show:
  935. # Rendering SLS 'my.sls' failed. Please see master log for details.
  936. {{ get_config('pillar_safe_render_error', 'True') }}
  937. # The pillar_source_merging_strategy option allows you to configure merging strategy
  938. # between different sources. It accepts four values: recurse, aggregate, overwrite,
  939. # or smart. Recurse will merge recursively mapping of data. Aggregate instructs
  940. # aggregation of elements between sources that use the #!yamlex renderer. Overwrite
  941. # will verwrite elements according the order in which they are processed. This is
  942. # behavior of the 2014.1 branch and earlier. Smart guesses the best strategy based
  943. # on the "renderer" setting and is the default value.
  944. {{ get_config('pillar_source_merging_strategy', 'smart') }}
  945. # Recursively merge lists by aggregating them instead of replacing them.
  946. {{ get_config('pillar_merge_lists', False) }}
  947. # Git External Pillar (git_pillar) Configuration Options
  948. #
  949. # Specify the provider to be used for git_pillar. Must be either pygit2 or
  950. # gitpython. If unset, then both will be tried in that same order, and the
  951. # first one with a compatible version installed will be the provider that
  952. # is used.
  953. {{ get_config('git_pillar_provider', 'pygit2') }}
  954. # If the desired branch matches this value, and the environment is omitted
  955. # from the git_pillar configuration, then the environment for that git_pillar
  956. # remote will be base.
  957. {{ get_config('git_pillar_base', 'master') }}
  958. # If the branch is omitted from a git_pillar remote, then this branch will
  959. # be used instead.
  960. {{ get_config('git_pillar_branch', 'master') }}
  961. # Environment to use for git_pillar remotes. This is normally derived from
  962. # the branch/tag (or from a per-remote env parameter), but if set this will
  963. # override the process of deriving the env from the branch/tag name.
  964. {{ get_config('git_pillar_env', '') }}
  965. # Path relative to the root of the repository where the git_pillar top file
  966. # and SLS files are located.
  967. {{ get_config('git_pillar_root', 'pillar') }}
  968. # Specifies whether or not to ignore SSL certificate errors when contacting
  969. # the remote repository.
  970. {{ get_config('git_pillar_ssl_verify', True) }}
  971. # When set to False, if there is an update/checkout lock for a git_pillar
  972. # remote and the pid written to it is not running on the master, the lock
  973. # file will be automatically cleared and a new lock will be obtained.
  974. {{ get_config('git_pillar_global_lock', False) }}
  975. # Git External Pillar Authentication Options
  976. #
  977. # Along with git_pillar_password, is used to authenticate to HTTPS remotes.
  978. {{ get_config('git_pillar_user', '') }}
  979. # Along with git_pillar_user, is used to authenticate to HTTPS remotes.
  980. # This parameter is not required if the repository does not use authentication.
  981. {{ get_config('git_pillar_password', '') }}
  982. # By default, Salt will not authenticate to an HTTP (non-HTTPS) remote.
  983. # This parameter enables authentication over HTTP.
  984. {{ get_config('git_pillar_insecure_auth', False) }}
  985. # Along with git_pillar_privkey (and optionally git_pillar_passphrase),
  986. # is used to authenticate to SSH remotes.
  987. {{ get_config('git_pillar_pubkey', '') }}
  988. # Along with git_pillar_pubkey (and optionally git_pillar_passphrase),
  989. # is used to authenticate to SSH remotes.
  990. {{ get_config('git_pillar_privkey', '') }}
  991. # This parameter is optional, required only when the SSH key being used
  992. # to authenticate is protected by a passphrase.
  993. {{ get_config('git_pillar_passphrase', '') }}
  994. ##### Syndic settings #####
  995. ##########################################
  996. # The Salt syndic is used to pass commands through a master from a higher
  997. # master. Using the syndic is simple. If this is a master that will have
  998. # syndic servers(s) below it, then set the "order_masters" setting to True.
  999. #
  1000. # If this is a master that will be running a syndic daemon for passthrough, then
  1001. # the "syndic_master" setting needs to be set to the location of the master server
  1002. # to receive commands from.
  1003. # Set the order_masters setting to True if this master will command lower
  1004. # masters' syndic interfaces.
  1005. {{ get_config('order_masters', 'False') }}
  1006. # If this master will be running a salt syndic daemon, syndic_master tells
  1007. # this master where to receive commands from.
  1008. {{ get_config('syndic_master', 'masterofmaster') }}
  1009. # This is the 'ret_port' of the MasterOfMaster:
  1010. {{ get_config('syndic_master_port', '4506') }}
  1011. # PID file of the syndic daemon:
  1012. {{ get_config('syndic_pidfile', '/var/run/salt-syndic.pid') }}
  1013. # LOG file of the syndic daemon:
  1014. {{ get_config('syndic_log_file', 'syndic.log') }}
  1015. # The user under which the salt syndic will run.
  1016. {{ get_config('syndic_user', 'root') }}
  1017. ##### Peer Publish settings #####
  1018. ##########################################
  1019. # Salt minions can send commands to other minions, but only if the minion is
  1020. # allowed to. By default "Peer Publication" is disabled, and when enabled it
  1021. # is enabled for specific minions and specific commands. This allows secure
  1022. # compartmentalization of commands based on individual minions.
  1023. # The configuration uses regular expressions to match minions and then a list
  1024. # of regular expressions to match functions. The following will allow the
  1025. # minion authenticated as foo.example.com to execute functions from the test
  1026. # and pkg modules.
  1027. #peer:
  1028. # foo.example.com:
  1029. # - test.*
  1030. # - pkg.*
  1031. #
  1032. # This will allow all minions to execute all commands:
  1033. #peer:
  1034. # .*:
  1035. # - .*
  1036. #
  1037. # This is not recommended, since it would allow anyone who gets root on any
  1038. # single minion to instantly have root on all of the minions!
  1039. {% if 'peer' in cfg_master %}
  1040. {%- do default_keys.append('peer') %}
  1041. peer:
  1042. {% for name, roots in cfg_master['peer'].items() %}
  1043. {{ name }}:
  1044. {% for mod in roots %}
  1045. - {{ mod }}
  1046. {% endfor %}
  1047. {% endfor %}
  1048. {% elif 'peer' in cfg_salt %}
  1049. peer:
  1050. {% for name, roots in cfg_salt['peer'].items() %}
  1051. {{ name }}:
  1052. {% for mod in roots %}
  1053. - {{ mod }}
  1054. {% endfor %}
  1055. {% endfor %}
  1056. {% endif %}
  1057. # Minions can also be allowed to execute runners from the salt master.
  1058. # Since executing a runner from the minion could be considered a security risk,
  1059. # it needs to be enabled. This setting functions just like the peer setting
  1060. # except that it opens up runners instead of module functions.
  1061. #
  1062. # All peer runner support is turned off by default and must be enabled before
  1063. # using. This will enable all peer runners for all minions:
  1064. #peer_run:
  1065. # .*:
  1066. # - .*
  1067. #
  1068. # To enable just the manage.up runner for the minion foo.example.com:
  1069. #peer_run:
  1070. # foo.example.com:
  1071. # - manage.up
  1072. {% if 'peer_run' in cfg_master %}
  1073. {%- do default_keys.append('peer_run') %}
  1074. peer_run:
  1075. {% for name, roots in cfg_master['peer_run'].items() %}
  1076. {{ name }}:
  1077. {% for mod in roots %}
  1078. - {{ mod }}
  1079. {% endfor %}
  1080. {% endfor %}
  1081. {% elif 'peer_run' in cfg_salt %}
  1082. peer_run:
  1083. {% for name, roots in cfg_salt['peer_run'].items() %}
  1084. {{ name }}:
  1085. {% for mod in roots %}
  1086. - {{ mod }}
  1087. {% endfor %}
  1088. {% endfor %}
  1089. {% endif %}
  1090. ##### Mine settings #####
  1091. #####################################
  1092. # Restrict mine.get access from minions. By default any minion has a full access
  1093. # to get all mine data from master cache. In acl definion below, only pcre matches
  1094. # are allowed.
  1095. # mine_get:
  1096. # .*:
  1097. # - .*
  1098. #
  1099. # The example below enables minion foo.example.com to get 'network.interfaces' mine
  1100. # data only, minions web* to get all network.* and disk.* mine data and all other
  1101. # minions won't get any mine data.
  1102. {% if 'mine_get' in cfg_master -%}
  1103. {%- do default_keys.append('mine_get') %}
  1104. mine_get:
  1105. {%- for minion, data in cfg_master['mine_get']|dictsort %}
  1106. {{ minion }}:
  1107. {%- for command in data %}
  1108. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  1109. {%- endfor -%}
  1110. {%- endfor -%}
  1111. {% elif 'mine_get' in cfg_salt -%}
  1112. mine_get:
  1113. {%- for minion, data in cfg_salt['mine_get']|dictsort %}
  1114. {{ minion }}:
  1115. {%- for command in data %}
  1116. - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
  1117. {%- endfor -%}
  1118. {%- endfor -%}
  1119. {% else -%}
  1120. # mine_get:
  1121. # foo.example.com:
  1122. # - network.interfaces
  1123. # web.*:
  1124. # - network.*
  1125. # - disk.*
  1126. {%- endif %}
  1127. ##### Logging settings #####
  1128. ##########################################
  1129. # The location of the master log file
  1130. # The master log can be sent to a regular file, local path name, or network
  1131. # location. Remote logging works best when configured to use rsyslogd(8) (e.g.:
  1132. # ``file:///dev/log``), with rsyslogd(8) configured for network logging. The URI
  1133. # format is: <file|udp|tcp>://<host|socketpath>:<port-if-required>/<log-facility>
  1134. #log_file: /var/log/salt/master
  1135. #log_file: file:///dev/log
  1136. #log_file: udp://loghost:10514
  1137. {{ get_config('log_file', '/var/log/salt/master') }}
  1138. {{ get_config('key_logfile', '/var/log/salt/key') }}
  1139. # The level of messages to send to the console.
  1140. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
  1141. #
  1142. # The following log levels are considered INSECURE and may log sensitive data:
  1143. # ['garbage', 'trace', 'debug']
  1144. #
  1145. {{ get_config('log_level', 'warning') }}
  1146. # The level of messages to send to the log file.
  1147. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
  1148. # If using 'log_granular_levels' this must be set to the highest desired level.
  1149. {{ get_config('log_level_logfile', 'warning') }}
  1150. # The date and time format used in log messages. Allowed date/time formating
  1151. # can be seen here: http://docs.python.org/library/time.html#time.strftime
  1152. {{ get_config('log_datefmt', "'%H:%M:%S'") }}
  1153. {{ get_config('log_datefmt_logfile', "'%Y-%m-%d %H:%M:%S'") }}
  1154. # The format of the console logging messages. Allowed formatting options can
  1155. # be seen here: http://docs.python.org/library/logging.html#logrecord-attributes
  1156. #
  1157. # Console log colors are specified by these additional formatters:
  1158. #
  1159. # %(colorlevel)s
  1160. # %(colorname)s
  1161. # %(colorprocess)s
  1162. # %(colormsg)s
  1163. #
  1164. # Since it is desirable to include the surrounding brackets, '[' and ']', in
  1165. # the coloring of the messages, these color formatters also include padding as
  1166. # well. Color LogRecord attributes are only available for console logging.
  1167. #
  1168. {{ get_config('log_fmt_console', "'%(colorlevel)s %(colormsg)s'") }}
  1169. {{ get_config('log_fmt_console', "'[%(levelname)-8s] %(message)s'") }}
  1170. {{ get_config('log_fmt_logfile', "'%(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s'") }}
  1171. # This can be used to control logging levels more specificically. This
  1172. # example sets the main salt library at the 'warning' level, but sets
  1173. # 'salt.modules' to log at the 'debug' level:
  1174. # log_granular_levels:
  1175. # 'salt': 'warning'
  1176. # 'salt.modules': 'debug'
  1177. #
  1178. {% if 'log_granular_levels' in cfg_master %}
  1179. {%- do default_keys.append('log_granular_levels') %}
  1180. log_granular_levels:
  1181. {% for name, lvl in cfg_master['log_granular_levels'].items() %}
  1182. {{ name }}: {{ lvl }}
  1183. {% endfor %}
  1184. {% elif 'log_granular_levels' in cfg_salt %}
  1185. log_granular_levels:
  1186. {% for name, lvl in cfg_salt['log_granular_levels'].items() %}
  1187. {{ name }}: {{ lvl }}
  1188. {% endfor %}
  1189. {% else %}
  1190. #log_granular_levels: {}
  1191. {% endif %}
  1192. ##### Node Groups ######
  1193. ##########################################
  1194. # Node groups allow for logical groupings of minion nodes. A group consists of a group
  1195. # name and a compound target.
  1196. #nodegroups:
  1197. # group1: 'L@foo.domain.com,bar.domain.com,baz.domain.com and bl*.domain.com'
  1198. # group2: 'G@os:Debian and foo.domain.com'
  1199. {%- if 'nodegroups' in cfg_master %}
  1200. {%- do default_keys.append('nodegroups') %}
  1201. nodegroups:
  1202. {%- for name, lvl in cfg_master['nodegroups'].items() %}
  1203. {{ name }}: {{ lvl }}
  1204. {%- endfor %}
  1205. {%- elif 'nodegroups' in cfg_salt %}
  1206. nodegroups:
  1207. {%- for name, lvl in cfg_salt['nodegroups'].items() %}
  1208. {{ name }}: {{ lvl }}
  1209. {%- endfor %}
  1210. {%- endif %}
  1211. ##### Range Cluster settings #####
  1212. ##########################################
  1213. # The range server (and optional port) that serves your cluster information
  1214. # https://github.com/ytoolshed/range/wiki/%22yamlfile%22-module-file-spec
  1215. #
  1216. {{ get_config('range_server', 'range:80') }}
  1217. ##### Windows Software Repo settings #####
  1218. ###########################################
  1219. # Specify the provider to be used for git_pillar. Must be either pygit2 or
  1220. # gitpython. If unset, then both will be tried in that same order, and the
  1221. # first one with a compatible version installed will be the provider that
  1222. # is used.
  1223. {{ get_config('winrepo_provider', 'pygit2') }}
  1224. # Repo settings for 2015.8+ master used with 2015.8+ Windows minions
  1225. #
  1226. # Location of the repo on the master:
  1227. {{ get_config('winrepo_dir_ng', '/srv/salt/win/repo-ng') }}
  1228. # List of git repositories to include with the local repo:
  1229. {% if 'winrepo_remotes_ng' in cfg_master %}
  1230. {%- do default_keys.append('winrepo_remotes_ng') %}
  1231. winrepo_remotes_ng:
  1232. {% for repo in cfg_master['winrepo_remotes_ng'] %}
  1233. - {{ repo }}
  1234. {% endfor %}
  1235. {% elif 'winrepo_remotes_ng' in cfg_salt %}
  1236. winrepo_remotes_ng:
  1237. {% for repo in cfg_salt['winrepo_remotes_ng'] %}
  1238. - {{ repo }}
  1239. {% endfor %}
  1240. {% else %}
  1241. #winrepo_remotes_ng:
  1242. # - 'https://github.com/saltstack/salt-winrepo-ng.git'
  1243. {% endif %}
  1244. # Repo settings for 2015.8+ master used with pre-2015.8 Windows minions
  1245. #
  1246. # Location of the repo on the master:
  1247. {{ get_config('winrepo_dir', '/srv/salt/win/repo') }}
  1248. # Location of the master's repo cache file:
  1249. {{ get_config('winrepo_cachefile', 'winrepo.p') }}
  1250. # List of git repositories to include with the local repo:
  1251. {% if 'winrepo_remotes' in cfg_master %}
  1252. {%- do default_keys.append('winrepo_remotes') %}
  1253. winrepo_remotes:
  1254. {% for repo in cfg_master['winrepo_remotes'] %}
  1255. - {{ repo }}
  1256. {% endfor %}
  1257. {% elif 'winrepo_remotes' in cfg_salt %}
  1258. winrepo_remotes:
  1259. {% for repo in cfg_salt['winrepo_remotes'] %}
  1260. - {{ repo }}
  1261. {% endfor %}
  1262. {% else %}
  1263. #winrepo_remotes:
  1264. # - 'https://github.com/saltstack/salt-winrepo.git'
  1265. {% endif %}
  1266. ##### Windows Software Repo settings - Pre 2015.8 #####
  1267. ########################################################
  1268. # Legacy repo settings for pre-2015.8 Windows minions.
  1269. #
  1270. # Location of the repo on the master:
  1271. {{ get_config('win_repo', '/srv/salt/win/repo') }}
  1272. # Location of the master's repo cache file:
  1273. {{ get_config('win_repo_mastercachefile', '/srv/salt/win/repo/winrepo.p') }}
  1274. # List of git repositories to include with the local repo:
  1275. {% if 'win_gitrepos' in cfg_master %}
  1276. {%- do default_keys.append('win_gitrepos') %}
  1277. win_gitrepos:
  1278. {% for repo in cfg_master['win_gitrepos'] %}
  1279. - {{ repo }}
  1280. {% endfor %}
  1281. {% elif 'win_gitrepos' in cfg_salt %}
  1282. win_gitrepos:
  1283. {% for repo in cfg_salt['win_gitrepos'] %}
  1284. - {{ repo }}
  1285. {% endfor %}
  1286. {% else %}
  1287. #winrepo_remotes:
  1288. # - 'https://github.com/saltstack/salt-winrepo.git'
  1289. {% endif %}
  1290. ##### Returner settings ######
  1291. ############################################
  1292. # Which returner(s) will be used for minion's result:
  1293. #return: mysql
  1294. {{ get_config('return', '')}}
  1295. ###### Miscellaneous settings ######
  1296. ############################################
  1297. # Default match type for filtering events tags: startswith, endswith, find, regex, fnmatch
  1298. {{ get_config('event_match_type', 'startswith') }}
  1299. {%- if 'halite' in cfg_master %}
  1300. {%- do default_keys.append('halite') %}
  1301. ##### Halite #####
  1302. ##########################################
  1303. halite:
  1304. {%- for name, value in cfg_master['halite'].items() %}
  1305. {{ name }}: {{ value }}
  1306. {%- endfor %}
  1307. {%- endif %}
  1308. {%- if 'rest_cherrypy' in cfg_master %}
  1309. {%- do default_keys.append('rest_cherrypy') %}
  1310. ##### rest_cherrypy #####
  1311. ##########################################
  1312. rest_cherrypy:
  1313. {%- for name, value in cfg_master['rest_cherrypy'].items() %}
  1314. {{ name }}: {{ value }}
  1315. {%- endfor %}
  1316. {%- endif %}
  1317. {%- if 'rest_tornado' in cfg_master %}
  1318. {%- do default_keys.append('rest_tornado') %}
  1319. ##### rest_tornado #####
  1320. ###########################################
  1321. rest_tornado:
  1322. {%- for name, value in cfg_master['rest_tornado'].items() %}
  1323. {{ name }}: {{ value }}
  1324. {%- endfor %}
  1325. {%- endif %}
  1326. {%- if 'presence_events' in cfg_master %}
  1327. ##### presence events #####
  1328. ##########################################
  1329. {{ get_config('presence_events', 'False') }}
  1330. {%- endif %}
  1331. {%- if 'consul_config' in cfg_master %}
  1332. {%- do default_keys.append('consul_config') %}
  1333. ##### consul_config #####
  1334. ##########################################
  1335. consul_config:
  1336. {%- for name, value in cfg_master['consul_config'].items() %}
  1337. {{ name }}: {{ value }}
  1338. {%- endfor %}
  1339. {%- endif %}
  1340. {% if 'mongo' in cfg_master -%}
  1341. {%- do default_keys.append('mongo') %}
  1342. ##### mongodb connection settings #####
  1343. ##########################################
  1344. {%- for name, value in cfg_master['mongo'].items() %}
  1345. mongo.{{ name }}: {{ value }}
  1346. {%- endfor %}
  1347. {% if 'alternative.mongo' in cfg_master -%}
  1348. {%- do default_keys.append('alternative.mongo') %}
  1349. {%- for name, value in cfg_master['alternative.mongo'].items() %}
  1350. alternative.mongo.{{ name }}: {{ value }}
  1351. {%- endfor %}
  1352. {% endif %}
  1353. {%- endif %}
  1354. {%- for configname in cfg_master %}
  1355. {%- if configname not in reserved_keys and configname not in default_keys %}
  1356. {{ configname }}: {{ cfg_master[configname]|json }}
  1357. {%- endif %}
  1358. {%- endfor %}