Advertisement
Guest User

Salt Master

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