Saltstack Official Salt Formula
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

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