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.

477 lines
14KB

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