Saltstack Official Salt Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

451 rinda
13KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. salt:
  5. # Set this to true to clean any non-salt-formula managed files out of
  6. # /etc/salt/{master,minion}.d ... You really don't want to do this on 2015.2
  7. # and up as it'll wipe out important files that Salt relies on.
  8. clean_config_d_dir: false
  9. # This state will remove "/etc/salt/minion" when you set this to true.
  10. minion_remove_config: true
  11. # This state will remove "/etc/salt/master" when you set this to true.
  12. master_remove_config: true
  13. # Set this to 'py3' to install the Python 3 packages.
  14. # If this is not set, the Python 2 packages will be installed by default.
  15. py_ver: 'py3'
  16. # Set this to false to not have the formula install packages (in the case you
  17. # install Salt via git/pip/etc.)
  18. install_packages: true
  19. # Optional: set salt version (if install_packages is set to true)
  20. version: 2017.7.2-1.el7
  21. # to overwrite map.jinja salt packages
  22. lookup:
  23. salt_master: 'salt-master'
  24. salt_minion: 'salt-minion'
  25. salt_syndic: 'salt-syndic'
  26. salt_cloud: 'salt-cloud'
  27. salt_ssh: 'salt-ssh'
  28. pyinotify: 'python-pyinotify' # the package to be installed for pyinotify
  29. # Set which release of SaltStack to use, default to 'latest'
  30. # To get the available releases:
  31. # * http://repo.saltstack.com/yum/redhat/7/x86_64/
  32. # * http://repo.saltstack.com/apt/debian/8/amd64/
  33. release: '2018.3'
  34. # MacOS has no package management.
  35. # Instead, we use file.managed to download an appropriate .pkg file and
  36. # macpackage.installed to install it 'version', if set (see above), will be
  37. # used to check the .pkg version to determine if it should be installed
  38. #
  39. # NOTE: if 'version' is not set version comparison will not occur and the
  40. # .pkg WILL NOT be installed if a salt .pkg is already installed
  41. # NOTE: salt_minion_pkg_hash, if set, will be passed into file.managed's
  42. # source_hash, use URL or hash string
  43. # yamllint disable rule:line-length
  44. salt_minion_pkg_source: 'https://repo.saltstack.com/osx/salt-2017.7.4-py3-x86_64.pkg'
  45. salt_minion_pkg_hash: 'https://repo.saltstack.com/osx/salt-2017.7.4-py3-x86_64.pkg.md5'
  46. # yamllint enable rule:line-length
  47. # tofs:
  48. # The files_switch key serves as a selector for alternative
  49. # directories under the formula files directory. See TOFS pattern
  50. # doc for more info.
  51. # Note: Any value not evaluated by `config.get` will be used literally.
  52. # This can be used to set custom paths, as many levels deep as required.
  53. # files_switch:
  54. # - any/path/can/be/used/here
  55. # - id
  56. # - osfinger
  57. # - os
  58. # - os_family
  59. # All aspects of path/file resolution are customisable using the options below.
  60. # This is unnecessary in most cases; there are sensible defaults.
  61. # path_prefix: template_alt
  62. # dirs:
  63. # files: files_alt
  64. # default: default_alt
  65. # source_files:
  66. # salt-master:
  67. # - 'alt_master.d'
  68. # salt-minion:
  69. # - 'alt_minion.d'
  70. # salt master config
  71. master_config_use_TOFS: true
  72. master:
  73. fileserver_backend:
  74. - git
  75. - s3fs
  76. - roots
  77. gitfs_remotes:
  78. - git://github.com/saltstack-formulas/salt-formula.git:
  79. - base: develop
  80. s3.keyid: GKTADJGHEIQSXMKKRBJ08H
  81. s3.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
  82. s3.buckets:
  83. - bucket1
  84. - bucket2
  85. - bucket3
  86. - bucket4
  87. file_roots:
  88. base:
  89. - /srv/salt
  90. pillar_roots:
  91. base:
  92. - /srv/pillar
  93. # for salt-api with tornado rest interface
  94. rest_tornado:
  95. port: 8000
  96. ssl_crt: /etc/pki/api/certs/server.crt
  97. ssl_key: /etc/pki/api/certs/server.key
  98. debug: false
  99. disable_ssl: false
  100. # yamllint disable-line rule:line-length
  101. # for profile configuration as https://docs.saltstack.com/en/latest/topics/tutorials/lxc.html#tutorial-lxc-profiles
  102. lxc.container_profile:
  103. debian:
  104. template: download
  105. options:
  106. dist: debian
  107. release: jessie
  108. arch: amd64
  109. backing: lvm
  110. vgname: kimsufi
  111. size: 10G
  112. lxc.network_profile:
  113. basic:
  114. eth0:
  115. link: lxcbr0
  116. type: veth
  117. flags: up
  118. ## for external auth - LDAP
  119. ## filter to use for Active Directory LDAP
  120. # auth.ldap.filter: {% raw %}'sAMAccountName={{username}}'{% endraw %}
  121. ## filter to use for Most other LDAP servers
  122. # auth.ldap.filter: {% raw %}'uid={{ username }}'{% endraw %}
  123. # Define winrepo provider, by default support order is pygit2, gitpython
  124. # Set to gitpython for Debian & Ubuntu to get around saltstack/salt#35993
  125. # where pygit2 is not compiled with pygit2.GIT_FEATURE_HTTPS support
  126. winrepo_provider: gitpython
  127. # optional engine configuration
  128. engines:
  129. - slack:
  130. token: xoxp-XXXXX-XXXXXXX # use Slack's legacy API token
  131. control: true
  132. valid_users:
  133. - someuser
  134. - otheruser
  135. valid_commands:
  136. - test.ping
  137. - list_jobs
  138. aliases:
  139. list_jobs:
  140. type: runner
  141. cmd: jobs.list_jobs
  142. # optional: these reactors will be configured on the master
  143. # They override reactors configured in
  144. # 'salt:reactors' or the old 'salt:reactor' parameters
  145. reactors:
  146. - 'master/deploy':
  147. - /srv/salt/reactors/deploy.sls
  148. # salt minion config:
  149. minion_config_use_TOFS: true
  150. minion:
  151. # single master setup
  152. master: salt
  153. # multi master setup
  154. # master:
  155. # - salt_master_1
  156. # - salt_master_2
  157. fileserver_backend:
  158. - git
  159. - roots
  160. gitfs_remotes:
  161. - git://github.com/saltstack-formulas/salt-formula.git:
  162. - base: develop
  163. file_roots:
  164. base:
  165. - /srv/salt
  166. pillar_roots:
  167. base:
  168. - /srv/pillar
  169. module_config:
  170. test: true
  171. test.foo: foo
  172. test.bar:
  173. - baz
  174. - quo
  175. test.baz:
  176. spam: sausage
  177. cheese: bread
  178. # salt mine setup
  179. mine_interval: 60
  180. # mine_functions can be set at the top level of the pillar, and
  181. # that is preferable because it doesn't affect the conf file and
  182. # doesn't require a minion restart. However, you can configure it
  183. # here instead if you really want to.
  184. mine_functions:
  185. network.interface_ip: [eth0]
  186. # Define a minion scheduler
  187. schedule:
  188. - highstate:
  189. - function: state.apply
  190. - minutes: 60
  191. - returner: redis
  192. # other 'non-default' config
  193. auth_keytab: /root/auth.keytab
  194. auth_principal: kadmin/admin
  195. # optional engine configuration
  196. engines:
  197. - slack:
  198. token: xoxp-XXXXX-XXXXXXX # use Slack's legacy API token
  199. control: true
  200. valid_users:
  201. - someuser
  202. - otheruser
  203. valid_commands:
  204. - test.ping
  205. - list_jobs
  206. aliases:
  207. list_jobs:
  208. type: runner
  209. cmd: jobs.list_jobs
  210. # optional beacons configuration
  211. beacons:
  212. load:
  213. 1m:
  214. - 0.0
  215. - 2.0
  216. 5m:
  217. - 0.0
  218. - 1.5
  219. 15m:
  220. - 0.1
  221. - 1.0
  222. interval: 10
  223. # Optional reactors: these reactors will be configured on the minion
  224. # They override reactors configured in
  225. # 'salt:reactors' or the old 'salt:reactor' parameters
  226. reactors:
  227. - 'minion/deploy':
  228. - /srv/salt/reactors/deploy.sls
  229. # Optional: Configure an elasticsearch returner
  230. return: elasticsearch
  231. elasticsearch:
  232. hosts:
  233. - example.elasticsearch.host:9200
  234. - example.elasticsearch.host2:9200
  235. index_date: true
  236. index: salt
  237. number_of_shards: 5
  238. number_of_replicas: 2
  239. debug_returner_payload: true
  240. states_count: true
  241. states_order_output: true
  242. states_single_index: true
  243. functions_blacklist:
  244. - test.ping
  245. - saltutil.find_job
  246. # salt cloud config
  247. cloud:
  248. master: salt
  249. # For non-templated custom cloud provider/profile/map files
  250. providers:
  251. provider-filename1.conf:
  252. vmware-prod:
  253. driver: vmware
  254. user: myusernameprod
  255. password: mypassword
  256. vmware-nonprod:
  257. driver: vmware
  258. user: myusernamenonprod
  259. password: mypassword
  260. profiles:
  261. profile-filename1.conf:
  262. server-non-prod:
  263. clonefrom: rhel6xtemplatenp
  264. grains:
  265. platform:
  266. name: salt
  267. realm: lab
  268. subscription_level: standard
  269. memory: 8GB
  270. num_cpus: 4
  271. password: sUpErsecretey
  272. provider: vmware-nonprod
  273. maps:
  274. map-filename1.map:
  275. server-non-prod:
  276. - host.mycompany.com:
  277. grains:
  278. environment: dev1
  279. # You can take profile and map templates from an alternate location
  280. # if you want to write your own.
  281. template_sources:
  282. providers: salt://salt/files/cloud.providers.d
  283. profiles: salt://salt/files/cloud.profiles.d
  284. maps: salt://salt/files/cloud.maps.d
  285. # These settings are used by the default provider templates and
  286. # only need to be set for the ones you're using.
  287. aws_key: AWSKEYIJSHJAIJS6JSH
  288. aws_secret: AWSSECRETYkkDY1iQf9zRtl9+pW+Nm+aZY95
  289. gce_project: test
  290. # yamllint disable-line rule:line-length
  291. gce_service_account_email_address: 867543072364-orl4h2tpp8jcn1tr9ipj@developer.gserviceaccount.com
  292. rsos_user: afeawofghob
  293. rsos_tenant: tenant_id_number
  294. rsos_apikey: WFJIOJEOIGHSOFHESO
  295. rsos_regions:
  296. - ORD
  297. - DFW
  298. - IAD
  299. - SYD
  300. - HKG
  301. ssh_roster:
  302. prod1:
  303. host: host.example.com
  304. user: ubuntu
  305. sudo: true
  306. priv: /etc/salt/ssh_keys/sshkey.pem
  307. gitfs:
  308. keys:
  309. global:
  310. # key and pub end up being the extension used on the key file
  311. # values other than key and pub are possible
  312. key: |
  313. -----BEGIN RSA PRIVATE KEY-----
  314. ...........
  315. -----END RSA PRIVATE KEY-----
  316. pub: |
  317. ...........
  318. # These reactors will be configured both in the minion and the master
  319. reactors:
  320. - 'deploy':
  321. - /srv/salt/reactors/deploy.sls
  322. salt_cloud_certs:
  323. aws:
  324. pem: |
  325. -----BEGIN RSA PRIVATE KEY-----
  326. ...........
  327. -----END RSA PRIVATE KEY-----
  328. gce:
  329. pem: |
  330. -----BEGIN RSA PRIVATE KEY-----
  331. ...........
  332. -----END RSA PRIVATE KEY-----
  333. salt_formulas:
  334. git_opts:
  335. # The Git options can be customized differently for each
  336. # environment, if an option is missing in a given environment, the
  337. # value from "default" is used instead.
  338. default:
  339. # URL where the formulas git repositories are downloaded from
  340. # it will be suffixed with <formula-name>.git
  341. baseurl: https://github.com/saltstack-formulas
  342. # Directory where Git repositories are downloaded
  343. basedir: /srv/formulas
  344. # Update the git repository to the latest version (false by default)
  345. update: false
  346. # Options passed directly to the git.latest state
  347. options:
  348. rev: master
  349. user: username
  350. identity: /path/to/.ssh/id_rsa_github_username
  351. dev:
  352. basedir: /srv/formulas/dev
  353. update: true
  354. options:
  355. rev: develop
  356. # Alternatively, a single directory with multiple branches can be used
  357. # E.g. It is strongly recommended to fork saltstack-formula repositories
  358. # to avoid unexpected changes to your infrastructure
  359. # Then upstream changes can be merged in manually with due consideration
  360. # Specific values for `rev`, `user` & `identity` will override the defaults
  361. production:
  362. baseurl: git@github.com:username
  363. options:
  364. branch: master
  365. remote: origin
  366. staging:
  367. baseurl: git@github.com:username
  368. options:
  369. branch: staging
  370. remote: origin
  371. rev: staging
  372. upstream:
  373. baseurl: git@github.com:saltstack-formulas
  374. update: true
  375. options:
  376. branch: upstream
  377. remote: upstream
  378. # Options of the file.directory state that creates the directory where
  379. # the git repositories of the formulas are stored
  380. basedir_opts:
  381. makedirs: true
  382. user: root
  383. group: root
  384. mode: 755
  385. # Explicitly checkout the original branch for repos after the
  386. # git.latest states have been processed (false by default)
  387. # Enable if using the alternative method (single directory, multiple branches)
  388. checkout_orig_branch: true
  389. # List of formulas to enable in each environment
  390. list:
  391. base:
  392. - salt-formula
  393. - postfix-formula
  394. - nginx-formula: # We can also override some options per formula
  395. rev: 'v1.1.0' # Pin a version
  396. - openssh-formula:
  397. rev: '3e01ad8' # or pin a commit id
  398. dev:
  399. - salt-formula
  400. - postfix-formula
  401. - openssh-formula
  402. - nginx-formula:
  403. # You can also pull from another location
  404. name: 'https://github.com/another-fork-location/salt-formula.git'
  405. rev: 'feat/feature'
  406. # Likewise for the alternative method (single directory, multiple branches)
  407. production:
  408. - salt-formula
  409. - openssh-formula
  410. staging:
  411. - salt-formula
  412. - postfix-formula
  413. - openssh-formula
  414. upstream:
  415. - salt-formula
  416. - postfix-formula
  417. - openssh-formula