Saltstack Official Salt Formula
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

345 lines
9.7KB

  1. salt:
  2. # Set this to true to clean any non-salt-formula managed files out of
  3. # /etc/salt/{master,minion}.d ... You really don't want to do this on 2015.2
  4. # and up as it'll wipe out important files that Salt relies on.
  5. clean_config_d_dir: False
  6. # This state will remove "/etc/salt/minion" when you set this to true.
  7. minion_remove_config: True
  8. # This state will remove "/etc/salt/master" when you set this to true.
  9. master_remove_config: True
  10. # Set this to False to not have the formula install packages (in the case you
  11. # install Salt via git/pip/etc.)
  12. install_packages: True
  13. # Optional: set salt version (if install_packages is set to True)
  14. version: 2017.7.2-1.el7
  15. # to overwrite map.jinja salt packages
  16. lookup:
  17. salt_master: 'salt-master'
  18. salt_minion: 'salt-minion'
  19. salt_syndic: 'salt-syndic'
  20. salt_cloud: 'salt-cloud'
  21. salt_ssh: 'salt-ssh'
  22. pyinotify: 'python-pyinotify' the package to be installed for pyinotify
  23. # Set which release of SaltStack to use, default to 'latest'
  24. # To get the available releases:
  25. # * http://repo.saltstack.com/yum/redhat/7/x86_64/
  26. # * http://repo.saltstack.com/apt/debian/8/amd64/
  27. release: "2016.11"
  28. # MacOS has no package management.
  29. # Instead, we use file.managed to download an appropriate .pkg file and macpackage.installed to install it
  30. # 'version', if set (see above), will be used to check the .pkg version to determine if it should be installed
  31. #
  32. # NOTE: if 'version' is not set version comparison will not occur and the .pkg WILL NOT be installed if a salt
  33. # .pkg is already installed
  34. # NOTE: salt_minion_pkg_hash, if set, will be passed into file.managed's source_hash, use URL or hash string
  35. salt_minion_pkg_source: 'https://repo.saltstack.com/osx/salt-2017.7.4-py3-x86_64.pkg'
  36. salt_minion_pkg_hash: 'https://repo.saltstack.com/osx/salt-2017.7.4-py3-x86_64.pkg.md5'
  37. # salt master config
  38. master:
  39. fileserver_backend:
  40. - git
  41. - s3fs
  42. - roots
  43. gitfs_remotes:
  44. - git://github.com/saltstack-formulas/salt-formula.git:
  45. - base: develop
  46. s3.keyid: GKTADJGHEIQSXMKKRBJ08H
  47. s3.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
  48. s3.buckets:
  49. - bucket1
  50. - bucket2
  51. - bucket3
  52. - bucket4
  53. file_roots:
  54. base:
  55. - /srv/salt
  56. pillar_roots:
  57. base:
  58. - /srv/pillar
  59. # for salt-api with tornado rest interface
  60. rest_tornado:
  61. port: 8000
  62. ssl_crt: /etc/pki/api/certs/server.crt
  63. ssl_key: /etc/pki/api/certs/server.key
  64. debug: False
  65. disable_ssl: False
  66. # for profile configuration as https://docs.saltstack.com/en/latest/topics/tutorials/lxc.html#tutorial-lxc-profiles
  67. lxc.container_profile:
  68. debian:
  69. template: download
  70. options:
  71. dist: debian
  72. release: jessie
  73. arch: amd64
  74. backing: lvm
  75. vgname: kimsufi
  76. size: 10G
  77. lxc.network_profile:
  78. basic:
  79. eth0:
  80. link: lxcbr0
  81. type: veth
  82. flags: up
  83. ## for external auth - LDAP
  84. # filter to use for Active Directory LDAP
  85. auth.ldap.filter: {% raw %}'sAMAccountName={{username}}'{% endraw %}
  86. # filter to use for Most other LDAP servers
  87. auth.ldap.filter: {% raw %}'uid={{ username }}'{% endraw %}
  88. # Define winrepo provider, by default support order is pygit2, gitpython
  89. # Set to gitpython for Debian & Ubuntu to get around saltstack/salt#35993
  90. # where pygit2 is not compiled with pygit2.GIT_FEATURE_HTTPS support
  91. winrepo_provider: gitpython
  92. # optional engine configuration
  93. engines:
  94. - slack:
  95. token: xoxp-XXXXX-XXXXXXX # use Slack's legacy API token
  96. control: True
  97. valid_users:
  98. - someuser
  99. - otheruser
  100. valid_commands:
  101. - test.ping
  102. - list_jobs
  103. aliases:
  104. list_jobs:
  105. type: runner
  106. cmd: jobs.list_jobs
  107. # optional: these reactors will be configured on the master
  108. # They override reactors configured in
  109. # 'salt:reactors' or the old 'salt:reactor' parameters
  110. reactors:
  111. - 'master/deploy':
  112. - /srv/salt/reactors/deploy.sls
  113. # salt minion config:
  114. minion:
  115. # single master setup
  116. master: salt
  117. # multi master setup
  118. #master:
  119. #- salt_master_1
  120. #- salt_master_2
  121. fileserver_backend:
  122. - git
  123. - roots
  124. gitfs_remotes:
  125. - git://github.com/saltstack-formulas/salt-formula.git:
  126. - base: develop
  127. file_roots:
  128. base:
  129. - /srv/salt
  130. pillar_roots:
  131. base:
  132. - /srv/pillar
  133. module_config:
  134. test: True
  135. test.foo: foo
  136. test.bar:
  137. - baz
  138. - quo
  139. test.baz:
  140. spam: sausage
  141. cheese: bread
  142. # salt mine setup
  143. mine_interval: 60
  144. # mine_functions can be set at the top level of the pillar, and
  145. # that is preferable because it doesn't affect the conf file and
  146. # doesn't require a minion restart. However, you can configure it
  147. # here instead if you really want to.
  148. mine_functions:
  149. network.interface_ip: [eth0]
  150. # Define a minion scheduler
  151. schedule:
  152. - highstate:
  153. - function: state.apply
  154. - minutes: 60
  155. - returner: redis
  156. # other 'non-default' config
  157. auth_keytab: /root/auth.keytab
  158. auth_principal: kadmin/admin
  159. # optional engine configuration
  160. engines:
  161. - slack:
  162. token: xoxp-XXXXX-XXXXXXX # use Slack's legacy API token
  163. control: True
  164. valid_users:
  165. - someuser
  166. - otheruser
  167. valid_commands:
  168. - test.ping
  169. - list_jobs
  170. aliases:
  171. list_jobs:
  172. type: runner
  173. cmd: jobs.list_jobs
  174. # optional beacons configuration
  175. beacons:
  176. load:
  177. 1m:
  178. - 0.0
  179. - 2.0
  180. 5m:
  181. - 0.0
  182. - 1.5
  183. 15m:
  184. - 0.1
  185. - 1.0
  186. interval: 10
  187. # Optional reactors: these reactors will be configured on the minion
  188. # They override reactors configured in
  189. # 'salt:reactors' or the old 'salt:reactor' parameters
  190. reactors:
  191. - 'minion/deploy':
  192. - /srv/salt/reactors/deploy.sls
  193. # salt cloud config
  194. cloud:
  195. master: salt
  196. # For non-templated custom cloud provider/profile/map files
  197. providers:
  198. provider-filename1.conf:
  199. vmware-prod:
  200. driver: vmware
  201. user: myusernameprod
  202. password: mypassword
  203. vmware-nonprod:
  204. driver: vmware
  205. user: myusernamenonprod
  206. password: mypassword
  207. profiles:
  208. profile-filename1.conf:
  209. server-non-prod:
  210. clonefrom: rhel6xtemplatenp
  211. grains:
  212. platform:
  213. name: salt
  214. realm: lab
  215. subscription_level: standard
  216. memory: 8GB
  217. num_cpus: 4
  218. password: sUpErsecretey
  219. provider: vmware-nonprod
  220. maps:
  221. map-filename1.map:
  222. server-non-prod:
  223. - host.mycompany.com:
  224. grains:
  225. environment: dev1
  226. # You can take profile and map templates from an alternate location
  227. # if you want to write your own.
  228. template_sources:
  229. providers: salt://salt/files/cloud.providers.d
  230. profiles: salt://salt/files/cloud.profiles.d
  231. maps: salt://salt/files/cloud.maps.d
  232. # These settings are used by the default provider templates and
  233. # only need to be set for the ones you're using.
  234. aws_key: AWSKEYIJSHJAIJS6JSH
  235. aws_secret: AWSSECRETYkkDY1iQf9zRtl9+pW+Nm+aZY95
  236. gce_project: test
  237. gce_service_account_email_address: 867543072364-orl4h2tpp8jcn1tr9ipj@developer.gserviceaccount.com
  238. rsos_user: afeawofghob
  239. rsos_tenant: tenant_id_number
  240. rsos_apikey: WFJIOJEOIGHSOFHESO
  241. rsos_regions:
  242. - ORD
  243. - DFW
  244. - IAD
  245. - SYD
  246. - HKG
  247. ssh_roster:
  248. prod1:
  249. host: host.example.com
  250. user: ubuntu
  251. sudo: True
  252. priv: /etc/salt/ssh_keys/sshkey.pem
  253. gitfs:
  254. keys:
  255. global:
  256. # key and pub end up being the extension used on the key file. values other than key and pub are possible
  257. key: |
  258. -----BEGIN RSA PRIVATE KEY-----
  259. ...........
  260. -----END RSA PRIVATE KEY-----
  261. pub: |
  262. ...........
  263. # These reactors will be configured both in the minion and the master
  264. reactors:
  265. - 'deploy':
  266. - /srv/salt/reactors/deploy.sls
  267. salt_cloud_certs:
  268. aws:
  269. pem: |
  270. -----BEGIN RSA PRIVATE KEY-----
  271. ...........
  272. -----END RSA PRIVATE KEY-----
  273. gce:
  274. pem: |
  275. -----BEGIN RSA PRIVATE KEY-----
  276. ...........
  277. -----END RSA PRIVATE KEY-----
  278. salt_formulas:
  279. git_opts:
  280. # The Git options can be customized differently for each
  281. # environment, if an option is missing in a given environment, the
  282. # value from "default" is used instead.
  283. default:
  284. # URL where the formulas git repositories are downloaded from
  285. # it will be suffixed with <formula-name>.git
  286. baseurl: https://github.com/saltstack-formulas
  287. # Directory where Git repositories are downloaded
  288. basedir: /srv/formulas
  289. # Update the git repository to the latest version (False by default)
  290. update: False
  291. # Options passed directly to the git.latest state
  292. options:
  293. rev: master
  294. dev:
  295. basedir: /srv/formulas/dev
  296. update: True
  297. options:
  298. rev: develop
  299. # Options of the file.directory state that creates the directory where
  300. # the git repositories of the formulas are stored
  301. basedir_opts:
  302. makedirs: True
  303. user: root
  304. group: root
  305. mode: 755
  306. # List of formulas to enable in each environment
  307. list:
  308. base:
  309. - salt-formula
  310. - postfix-formula
  311. dev:
  312. - salt-formula
  313. - postfix-formula
  314. - openssh-formula