├── .gitignore ├── saltstack ├── pillar │ ├── default.sls │ └── top.sls ├── salt │ ├── common │ │ ├── init.sls │ │ └── packages.sls │ └── top.sls ├── keys │ ├── minion1.pub │ ├── minion2.pub │ ├── master_minion.pub │ ├── master_minion.pem │ ├── minion1.pem │ └── minion2.pem └── etc │ ├── minion1 │ ├── minion2 │ └── master ├── README.rst ├── Vagrantfile └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | -------------------------------------------------------------------------------- /saltstack/pillar/default.sls: -------------------------------------------------------------------------------- 1 | # Default pillar values 2 | -------------------------------------------------------------------------------- /saltstack/pillar/top.sls: -------------------------------------------------------------------------------- 1 | base: 2 | '*': 3 | - default 4 | -------------------------------------------------------------------------------- /saltstack/salt/common/init.sls: -------------------------------------------------------------------------------- 1 | include: 2 | - common.packages -------------------------------------------------------------------------------- /saltstack/salt/top.sls: -------------------------------------------------------------------------------- 1 | base: 2 | '*': 3 | - common 4 | -------------------------------------------------------------------------------- /saltstack/salt/common/packages.sls: -------------------------------------------------------------------------------- 1 | common_packages: 2 | pkg.installed: 3 | - pkgs: 4 | - htop 5 | - strace 6 | - vim 7 | -------------------------------------------------------------------------------- /saltstack/keys/minion1.pub: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA67M5gZh37ziO6ObEVKg6 3 | IIHoCtRTLe8BIgQrayVg2LgOTBWrQzEyGKafcXsr52CJxRYTS6ucrsOiC7+rK/MP 4 | RBYCx0+YbsSogMDesf0fZ7/PIdgZbFs6wSb37twrF2iRZbDUSRnY0EHUQKaPb69Q 5 | zFu3E5qwkcWGc3X2kP5FRRM2N6bF8GWG9lhKkjsvTyvMyIoVcHj5V5bN4OOBO6iS 6 | ULEsB7g9nkcvpnRaaurXtw2qxejM//hDx036e8gah6IGgW1Mpq4KaVPsVhRaanhh 7 | 7s33y9Mzak5wfqdUGemFpXfVnPa4gmO32gOQrRxQcxU+XGWkDZqM1DpD+yq56J9Q 8 | DQIDAQAB 9 | -----END PUBLIC KEY----- -------------------------------------------------------------------------------- /saltstack/keys/minion2.pub: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxOknHTg7r/D1DWJgkgnA 3 | fLRkrz6O41qZ3UXZrMxfCAXVf2rgvixxqFCgcSnRF5DyiHXdRfh90uxVAEXxus8R 4 | 83xCtSb4rUwbo8kuePZrMvmwKjOxmhogSDR5yKsaOJr3xNptjoGp75ZkeLxTC5xv 5 | fvWVWylp9wM2NcCkFrsVSCXqaFd3wIqqsM/bqupSp6qbVOYQllJeBtNH/xEcZYf2 6 | 8rd3yRMxupDsHGNFk2y82oRd2jJrH2amMhuN/xD0txwQV7kSmLyTPl3CLo5D5LJw 7 | YAOUa23qM8pD/oep6R8WMckGekBTtEeaGS2YBcOP/RzAhHExQgUURgESWUpLOJ9Y 8 | JwIDAQAB 9 | -----END PUBLIC KEY----- -------------------------------------------------------------------------------- /saltstack/keys/master_minion.pub: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApvgmHbi1uoHZfioLbK1o 3 | 43KM//hZgxZNnwwMOIJz3Pa0w3F4FpCMbfCbDBgbOzWO2CUK3KbwMYAdP2WqKM1o 4 | iFLwFXB7n93fq0UZJzAkZm7FQ05AgFhePYuel0IXbTmxWJGGh+g/7pEjtXdaI0D2 5 | T/o8L+t6d/ax5QHA7/Ee9V+4r4LvmHg/vEVl7UX9gGRfhdKNncRyRqkkloju6ndS 6 | z4/a/9L+lVJXuODuIcf4BlOl79KcakEJSlky5Y/Ix+vgzD+aVI7z4DMGDLQ8Q4ox 7 | zNyHx4RLmFJ6CPO2YS7TVANTafd1plOemWUed7MZ9k2HYmW5bf6Reg/2vDNRheG2 8 | /QIDAQAB 9 | -----END PUBLIC KEY----- -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | Salt Vagrant Demo 3 | ================= 4 | 5 | A Salt Demo using Vagrant. 6 | 7 | 8 | Instructions 9 | ============ 10 | 11 | Run the following commands in a terminal. Git, VirtualBox and Vagrant must 12 | already be installed. 13 | 14 | .. code-block:: bash 15 | 16 | git clone https://github.com/UtahDave/salt-vagrant-demo.git 17 | cd salt-vagrant-demo 18 | vagrant plugin install vagrant-vbguest 19 | vagrant up 20 | 21 | 22 | This will download an Ubuntu VirtualBox image and create three virtual 23 | machines for you. One will be a Salt Master named `master` and two will be Salt 24 | Minions named `minion1` and `minion2`. The Salt Minions will point to the Salt 25 | Master and the Minion's keys will already be accepted. Because the keys are 26 | pre-generated and reside in the repo, please be sure to regenerate new keys if 27 | you use this for production purposes. 28 | 29 | You can then run the following commands to log into the Salt Master and begin 30 | using Salt. 31 | 32 | .. code-block:: bash 33 | 34 | vagrant ssh master 35 | sudo salt \* test.ping 36 | -------------------------------------------------------------------------------- /saltstack/keys/master_minion.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEogIBAAKCAQEApvgmHbi1uoHZfioLbK1o43KM//hZgxZNnwwMOIJz3Pa0w3F4 3 | FpCMbfCbDBgbOzWO2CUK3KbwMYAdP2WqKM1oiFLwFXB7n93fq0UZJzAkZm7FQ05A 4 | gFhePYuel0IXbTmxWJGGh+g/7pEjtXdaI0D2T/o8L+t6d/ax5QHA7/Ee9V+4r4Lv 5 | mHg/vEVl7UX9gGRfhdKNncRyRqkkloju6ndSz4/a/9L+lVJXuODuIcf4BlOl79Kc 6 | akEJSlky5Y/Ix+vgzD+aVI7z4DMGDLQ8Q4oxzNyHx4RLmFJ6CPO2YS7TVANTafd1 7 | plOemWUed7MZ9k2HYmW5bf6Reg/2vDNRheG2/QIDAQABAoIBAAo8mIml825V27HC 8 | fiTRlOas9TwUS9ifm26u3Gjyhov7jCWXZVds0U9EOx1ItRKyO+nAi6PvkDZYtnJW 9 | l1IdFdWV0CZgWRP6FGZ5vAsNBo5JKEryFz5HLK/1SWnYoXsO2HKnqWnXsWO8/kV3 10 | 5czXhMJugxYlB8MnGs0BiIStccp1VGYrNjJHrUq82A0UnDCyqiZDBo4vwZwHB17s 11 | 8Lo54IsTtsMU/neg7YM6X9v6p8KZW7S1FsnnCQRz7gf+iw0k7HiYp7OcFuEsKSgo 12 | RguSeeyKQghV84G0o+vRvyuHrhXceLdFS1F4qGleshApwQlcDa95NLrYzxoadLqb 13 | uer9gPkCgYEAuDR3HCab4/tKJg26YAED/Rq1jQZFVUgKfKYUCFZBjecWapceI25T 14 | v16lPnefVcjZI5B0y70ULTF4783WJ8rwCUMA0KNCmNua47ijILuyIDxnOsR87TZf 15 | qgEKK70B28soaanhvKqXlwu+sORhLRBiKlXBvz68HaY2qRKo3IWho4sCgYEA6Av0 16 | e87DSFvLy+t7OUHGZi6jYqINltQEw1bCpyxyP26CwGHXSjqHgYh/BowNoswgBFfs 17 | 0eM3H2k4yu8qt5AJHmp2tYrUKT2+FhM+NCJAdox/E4EuoEi1arKOwDTgylPPaG3E 18 | Qm2HJ6m9p+HTkbeYFluWlaREPVu2t72lLt7mwJcCgYATzphsL36dwhyUAO/keNd7 19 | 9M5GzsDPzcJK6vTGfLfp0Upoxb0Y5DkfH8c281fvunwWxea5Laiov2QYrRJ1Du5G 20 | oKzKwnNbymlaSTVJRMV/j98tw4kHXMxmlFwKnfVANBUxX3IFfnZ0aG/lx3jnhpZ3 21 | pOcDcHR7366K+ZWsuLXLxwKBgEU2q6nyNlVy7ArbJlohwGfiKWHWLG98th791fm/ 22 | TCSXdfCkPm8pnhmI+Tqes8KHWFVzVHQWbe60l/gP9pHiKJYl81qbGkVi4Tv8aWVr 23 | ggbaSV0r/xhYF6THtcSnARXYgdkIRK37tYCjJKratRyVwouIrhXcdW5H2OxdaNPe 24 | ML3pAoGAe5KJFoauVZ1NfoofUogpllzcWZNtpLYBESZhFcm8B4kmTEKwecUySj0e 25 | j23aJSUWEPuULgbSh8f2Ne7U18cZ1EVcvAA4wgvHH7UH3lkYBQBp2M7Kz7zCo8Pa 26 | uBNuPJjHR+UIFJ+KJ4u5A5wMnJQOtaJkLK9i+HSz62CioYjspJ4= 27 | -----END RSA PRIVATE KEY----- -------------------------------------------------------------------------------- /saltstack/keys/minion1.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpQIBAAKCAQEA67M5gZh37ziO6ObEVKg6IIHoCtRTLe8BIgQrayVg2LgOTBWr 3 | QzEyGKafcXsr52CJxRYTS6ucrsOiC7+rK/MPRBYCx0+YbsSogMDesf0fZ7/PIdgZ 4 | bFs6wSb37twrF2iRZbDUSRnY0EHUQKaPb69QzFu3E5qwkcWGc3X2kP5FRRM2N6bF 5 | 8GWG9lhKkjsvTyvMyIoVcHj5V5bN4OOBO6iSULEsB7g9nkcvpnRaaurXtw2qxejM 6 | //hDx036e8gah6IGgW1Mpq4KaVPsVhRaanhh7s33y9Mzak5wfqdUGemFpXfVnPa4 7 | gmO32gOQrRxQcxU+XGWkDZqM1DpD+yq56J9QDQIDAQABAoIBAQCqGdlZpvB/a4Dv 8 | ooN0WUhB557QGfXBw6g8pWe0VvBy1zoyPL0xq9JsqeuN2YeQ30HuQ4U/aiWUlsle 9 | 0z+0YyDUUVJGBzKKVlEJQqg1Kek9VdclpLCMW7amaPornydWKHguPJSoAQhRHAET 10 | e2EvCAY2xcX1VwEw4q2qrCp675aMRvOKhhDE4LiWSXW2g4gykTWDS/b+4Rt1B4IS 11 | Z+d7Qrgvd6uDN2OLa0reBZjrQOUCr8BTr5wajBcuQPOtx3NudkIOU6cSc1oBGeUE 12 | 5QZ3WB5uDylNhk1MezxzNn2snoQcyCZ9kYSBTqXrVSlwDRKgv7RMQdjte54qIuKL 13 | gQ4BNUbdAoGBAPB+vYDHGPUuYDTX2MOEx0gU+16R4m0KGuzoEV64ygqD+z5Oc09O 14 | hHIAoXyLkHtlsqJ2VJCmUSirvBwXKPu9W8SJZxklPC1b7/HeExX3OoJyf+pIgUt3 15 | LkbNMkF2a2PvxONriOaH7n8XvUiQCkIfIItEdlODd0nTfCYwvXr+mNsjAoGBAPrl 16 | WG1glhHzmvHb3vSyTeo2Snyi19rP0HB7dEaCcixQlYuLieewBPUC93pV4RQ1OkJS 17 | H5FzpgDRGjqWYQJttbHs6IbyIKUWxAZAzpTwY4ebBKquNMa//WdKp/Dq4km5OgLA 18 | c53iCnIuav8jwJkWIv5L478y0vTxkiKgo1/dW7MPAoGBAJzj8biLKkr44CZZEb4r 19 | Zt4tYfdF8JL13q7ijkJfBt9pToRNJYh9ToYYx0C6w5zcsXau/2gGODfyIRuqOEBS 20 | PgWvJaUP13w32AbPu1+/E1p6W9x5RG/45iWmQ7zVBiYCC03Zn0vVLc+XqxIldavB 21 | Jrf0B8VfpHhzETDQ5yvP3+RFAoGBAO1Cau/sMZ5CRxlGej3eS84bjy7z87pJYWyt 22 | YlS3UO7VOcYfq8a8bsOgDZXTlqi8eR50eMPcoHQPSYVz5cMdKoBab74FRJe5wp/D 23 | M1gnR4faMXyShvgYYLMIJ26tQFbFYbVudycrtgMqICaskZpzE55096c8kb/uneo/ 24 | DKBAPVJDAoGACXy1Ywazsm0XEBXQbOwmcUVzeGQVrRI3l1r082m3VUtAmUpufgTg 25 | 55kt0uEMEgLtUQkQSE3ELnHO7/KA3rd7uaabirs5k0KRv4eKDzQTTggqJbF2TTQ+ 26 | Scc5Gb/Ji8mNAO/jxBUhrLecQRX3gcFrTRZcWLfboThK1WYscbzLdp4= 27 | -----END RSA PRIVATE KEY----- -------------------------------------------------------------------------------- /saltstack/keys/minion2.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEAxOknHTg7r/D1DWJgkgnAfLRkrz6O41qZ3UXZrMxfCAXVf2rg 3 | vixxqFCgcSnRF5DyiHXdRfh90uxVAEXxus8R83xCtSb4rUwbo8kuePZrMvmwKjOx 4 | mhogSDR5yKsaOJr3xNptjoGp75ZkeLxTC5xvfvWVWylp9wM2NcCkFrsVSCXqaFd3 5 | wIqqsM/bqupSp6qbVOYQllJeBtNH/xEcZYf28rd3yRMxupDsHGNFk2y82oRd2jJr 6 | H2amMhuN/xD0txwQV7kSmLyTPl3CLo5D5LJwYAOUa23qM8pD/oep6R8WMckGekBT 7 | tEeaGS2YBcOP/RzAhHExQgUURgESWUpLOJ9YJwIDAQABAoIBAQC0sSsWciK7ega1 8 | KIBroo1DIhp+gY6HbP1igpWULtpJt2jKCt5/RLNre8ku7uuTj4wv0tChQ7zaj8oU 9 | fRqsjRXw9CcWqtNp2zxF2PhPQfjvBxc0MsmYGr9i4tyaWwCtzu7scnA0ZCH33G8I 10 | J/Cg6AWcYGmVBPTbGdRmEQfCYBzQXXV8kEWsJp6cl51BFrDhiWfnyAv1jKPlIBpy 11 | eTppQvbFjGoBOpnhPFdHisYm0dO1lOAJ8ooX3eaWZ1M3+AAmTHih3hx9K3QuS7By 12 | Rkn+r6mCB+UZGOA4okFnjWV3p2rCdTk0BaiglHou66SCy3yWADWtoGqX+OefOF+L 13 | XjGUb/DhAoGBANBRNGtIDoLh0MuCq2fBY6fNDr8RieejFWRVjY+Mml9HzKD6KNvQ 14 | JSQM6Xru2EM2wY0J/BG+ioV79c7uK0MnztgOur4Bh4ert6OiTgZXjFq2VC6aYKm9 15 | pQYY3OP//2oxodRAoDfzvIwPo06eAbyReOjZ2d/TlH8BS7cGYdX2M3+XAoGBAPH7 16 | j/Za0FW3ok/vFeugX/vSdF6/DUnx//t2uRntt3vra3+pA7OSA8brjWZUKRc6qHJG 17 | Usr9oj7+Pba5xbQE2K59rCsXAVhF5R8DEn/6meg+eLbZZBXDehElave+rfq3zN5E 18 | X9uRJteWNy79bkAZUHP363hNioNUZia/yRO81P3xAoGBAKp3WPrVOzK1EQQICLVd 19 | 1mvQ7FlEQ+IuXOn+7FlkiEqh2Xx9WQQPPuVSP5kebBAMdbQxUHlAv9/dgVd1JCfP 20 | In9BBmVHoR1PUnXv8gNUjwEIJLkCEUm1a54iqFdW/C5tMO0ceT9wD4FZppxFxkwF 21 | iriY1KZJYEHR0KCT82mAD8I/AoGAflq6cIw5DxlFUvHoA1KJ7CeXhkXCvaL05Ky4 22 | uNZNIhLq3g02FpUfDca/3fgCQNPrU0hvQPmxt6zwMrLMjlSdhHew6AsqM5rDqi7j 23 | gRotNX0xcWEQhuC8o6ljMpxJoopJGqKfXzprCtWwWQQShrvxK60AMqBivHLcqE0q 24 | xPisSzECgYAY+tXNAgqh0xwfQ5TnMzd37ASfSBJqnMRNEGbKWIlbUeG0ggLPYJC8 25 | mZYMF9I9bp1SOWUbGQMtqDrn3vg4cwHJ1DyFBHt1plLcoHueCNBr3rZgMWFRXlLv 26 | +q/lBVzv9Su7WTV4TTORcvg3DtoBNfsOrlD9kR1O/LYUyDj7sJFhsw== 27 | -----END RSA PRIVATE KEY----- -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 5 | VAGRANTFILE_API_VERSION = "2" 6 | 7 | Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 8 | os = "generic/ubuntu2004" 9 | net_ip = "192.168.56" 10 | 11 | config.vm.define :master, primary: true do |master_config| 12 | master_config.vm.provider "virtualbox" do |vb| 13 | vb.memory = "2048" 14 | vb.cpus = 1 15 | vb.name = "master" 16 | end 17 | 18 | master_config.vm.box = "#{os}" 19 | master_config.vm.host_name = 'saltmaster.local' 20 | master_config.vm.network "private_network", ip: "#{net_ip}.10" 21 | master_config.vm.synced_folder "saltstack/salt/", "/srv/salt" 22 | master_config.vm.synced_folder "saltstack/pillar/", "/srv/pillar" 23 | 24 | master_config.vm.provision :salt do |salt| 25 | salt.master_config = "saltstack/etc/master" 26 | salt.master_key = "saltstack/keys/master_minion.pem" 27 | salt.master_pub = "saltstack/keys/master_minion.pub" 28 | salt.minion_key = "saltstack/keys/master_minion.pem" 29 | salt.minion_pub = "saltstack/keys/master_minion.pub" 30 | salt.seed_master = { 31 | "minion1" => "saltstack/keys/minion1.pub", 32 | "minion2" => "saltstack/keys/minion2.pub" 33 | } 34 | 35 | salt.install_type = "stable" 36 | salt.install_master = true 37 | salt.no_minion = true 38 | salt.verbose = true 39 | salt.colorize = true 40 | salt.bootstrap_options = "-P -c /tmp -x python3" 41 | end 42 | end 43 | 44 | 45 | [ 46 | ["minion1", "#{net_ip}.11", "1024", os ], 47 | ["minion2", "#{net_ip}.12", "1024", os ], 48 | ].each do |vmname,ip,mem,os| 49 | config.vm.define "#{vmname}" do |minion_config| 50 | minion_config.vm.provider "virtualbox" do |vb| 51 | vb.memory = "#{mem}" 52 | vb.cpus = 1 53 | vb.name = "#{vmname}" 54 | end 55 | 56 | minion_config.vm.box = "#{os}" 57 | minion_config.vm.hostname = "#{vmname}" 58 | minion_config.vm.network "private_network", ip: "#{ip}" 59 | 60 | minion_config.vm.provision :salt do |salt| 61 | salt.minion_config = "saltstack/etc/#{vmname}" 62 | salt.minion_key = "saltstack/keys/#{vmname}.pem" 63 | salt.minion_pub = "saltstack/keys/#{vmname}.pub" 64 | salt.install_type = "stable" 65 | salt.verbose = true 66 | salt.colorize = true 67 | salt.bootstrap_options = "-P -c /tmp -x python3" 68 | end 69 | end 70 | end 71 | end 72 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /saltstack/etc/minion1: -------------------------------------------------------------------------------- 1 | ##### Primary configuration settings ##### 2 | ########################################## 3 | # This configuration file is used to manage the behavior of the Salt Minion. 4 | # With the exception of the location of the Salt Master Server, values that 5 | # are commented out but have no space after the comment are defaults that need 6 | # not be set in the config. If there is a space after the comment that the value 7 | # is presented as an example and is not the default. 8 | 9 | # Per default the minion will automatically include all config files 10 | # from minion.d/*.conf (minion.d is a directory in the same directory 11 | # as the main minion config file). 12 | #default_include: minion.d/*.conf 13 | 14 | # Set the location of the salt master server. If the master server cannot be 15 | # resolved, then the minion will fail to start. 16 | #master: salt 17 | master: 192.168.56.10 18 | 19 | # If multiple masters are specified in the 'master' setting, the default behavior 20 | # is to always try to connect to them in the order they are listed. If random_master is 21 | # set to True, the order will be randomized instead. This can be helpful in distributing 22 | # the load of many minions executing salt-call requests, for example, from a cron job. 23 | # If only one master is listed, this setting is ignored and a warning will be logged. 24 | #random_master: False 25 | 26 | # Set whether the minion should connect to the master via IPv6: 27 | #ipv6: False 28 | 29 | # Set the number of seconds to wait before attempting to resolve 30 | # the master hostname if name resolution fails. Defaults to 30 seconds. 31 | # Set to zero if the minion should shutdown and not retry. 32 | # retry_dns: 30 33 | 34 | # Set the port used by the master reply and authentication server. 35 | #master_port: 4506 36 | 37 | # The user to run salt. 38 | #user: root 39 | 40 | # Specify the location of the daemon process ID file. 41 | #pidfile: /var/run/salt-minion.pid 42 | 43 | # The root directory prepended to these options: pki_dir, cachedir, log_file, 44 | # sock_dir, pidfile. 45 | #root_dir: / 46 | 47 | # The directory to store the pki information in 48 | #pki_dir: /etc/salt/pki/minion 49 | 50 | # Explicitly declare the id for this minion to use, if left commented the id 51 | # will be the hostname as returned by the python call: socket.getfqdn() 52 | # Since salt uses detached ids it is possible to run multiple minions on the 53 | # same machine but with different ids, this can be useful for salt compute 54 | # clusters. 55 | #id: 56 | id: minion1 57 | 58 | # Append a domain to a hostname in the event that it does not exist. This is 59 | # useful for systems where socket.getfqdn() does not actually result in a 60 | # FQDN (for instance, Solaris). 61 | #append_domain: 62 | 63 | # Custom static grains for this minion can be specified here and used in SLS 64 | # files just like all other grains. This example sets 4 custom grains, with 65 | # the 'roles' grain having two values that can be matched against. 66 | #grains: 67 | # roles: 68 | # - webserver 69 | # - memcache 70 | # deployment: datacenter4 71 | # cabinet: 13 72 | # cab_u: 14-15 73 | 74 | # Where cache data goes. 75 | #cachedir: /var/cache/salt/minion 76 | 77 | # Verify and set permissions on configuration directories at startup. 78 | #verify_env: True 79 | 80 | # The minion can locally cache the return data from jobs sent to it, this 81 | # can be a good way to keep track of jobs the minion has executed 82 | # (on the minion side). By default this feature is disabled, to enable, set 83 | # cache_jobs to True. 84 | #cache_jobs: False 85 | 86 | # Set the directory used to hold unix sockets. 87 | #sock_dir: /var/run/salt/minion 88 | 89 | # Set the default outputter used by the salt-call command. The default is 90 | # "nested". 91 | #output: nested 92 | # 93 | # By default output is colored. To disable colored output, set the color value 94 | # to False. 95 | #color: True 96 | 97 | # Do not strip off the colored output from nested results and state outputs 98 | # (true by default). 99 | # strip_colors: False 100 | 101 | # Backup files that are replaced by file.managed and file.recurse under 102 | # 'cachedir'/file_backups relative to their original location and appended 103 | # with a timestamp. The only valid setting is "minion". Disabled by default. 104 | # 105 | # Alternatively this can be specified for each file in state files: 106 | # /etc/ssh/sshd_config: 107 | # file.managed: 108 | # - source: salt://ssh/sshd_config 109 | # - backup: minion 110 | # 111 | #backup_mode: minion 112 | 113 | # When waiting for a master to accept the minion's public key, salt will 114 | # continuously attempt to reconnect until successful. This is the time, in 115 | # seconds, between those reconnection attempts. 116 | #acceptance_wait_time: 10 117 | 118 | # If this is nonzero, the time between reconnection attempts will increase by 119 | # acceptance_wait_time seconds per iteration, up to this maximum. If this is 120 | # set to zero, the time between reconnection attempts will stay constant. 121 | #acceptance_wait_time_max: 0 122 | 123 | # If the master rejects the minion's public key, retry instead of exiting. 124 | # Rejected keys will be handled the same as waiting on acceptance. 125 | #rejected_retry: False 126 | 127 | # When the master key changes, the minion will try to re-auth itself to receive 128 | # the new master key. In larger environments this can cause a SYN flood on the 129 | # master because all minions try to re-auth immediately. To prevent this and 130 | # have a minion wait for a random amount of time, use this optional parameter. 131 | # The wait-time will be a random number of seconds between 0 and the defined value. 132 | #random_reauth_delay: 60 133 | 134 | # When waiting for a master to accept the minion's public key, salt will 135 | # continuously attempt to reconnect until successful. This is the timeout value, 136 | # in seconds, for each individual attempt. After this timeout expires, the minion 137 | # will wait for acceptance_wait_time seconds before trying again. Unless your master 138 | # is under unusually heavy load, this should be left at the default. 139 | #auth_timeout: 60 140 | 141 | # Number of consecutive SaltReqTimeoutError that are acceptable when trying to 142 | # authenticate. 143 | #auth_tries: 7 144 | 145 | # If authentication fails due to SaltReqTimeoutError during a ping_interval, 146 | # cause sub minion process to restart. 147 | #auth_safemode: False 148 | 149 | # Ping Master to ensure connection is alive (minutes). 150 | #ping_interval: 0 151 | 152 | # To auto recover minions if master changes IP address (DDNS) 153 | # auth_tries: 10 154 | # auth_safemode: False 155 | # ping_interval: 90 156 | # restart_on_error: True 157 | # 158 | # Minions won't know master is missing until a ping fails. After the ping fail, 159 | # the minion will attempt authentication and likely fails out and cause a restart. 160 | # When the minion restarts it will resolve the masters IP and attempt to reconnect. 161 | 162 | # If you don't have any problems with syn-floods, don't bother with the 163 | # three recon_* settings described below, just leave the defaults! 164 | # 165 | # The ZeroMQ pull-socket that binds to the masters publishing interface tries 166 | # to reconnect immediately, if the socket is disconnected (for example if 167 | # the master processes are restarted). In large setups this will have all 168 | # minions reconnect immediately which might flood the master (the ZeroMQ-default 169 | # is usually a 100ms delay). To prevent this, these three recon_* settings 170 | # can be used. 171 | # recon_default: the interval in milliseconds that the socket should wait before 172 | # trying to reconnect to the master (1000ms = 1 second) 173 | # 174 | # recon_max: the maximum time a socket should wait. each interval the time to wait 175 | # is calculated by doubling the previous time. if recon_max is reached, 176 | # it starts again at recon_default. Short example: 177 | # 178 | # reconnect 1: the socket will wait 'recon_default' milliseconds 179 | # reconnect 2: 'recon_default' * 2 180 | # reconnect 3: ('recon_default' * 2) * 2 181 | # reconnect 4: value from previous interval * 2 182 | # reconnect 5: value from previous interval * 2 183 | # reconnect x: if value >= recon_max, it starts again with recon_default 184 | # 185 | # recon_randomize: generate a random wait time on minion start. The wait time will 186 | # be a random value between recon_default and recon_default + 187 | # recon_max. Having all minions reconnect with the same recon_default 188 | # and recon_max value kind of defeats the purpose of being able to 189 | # change these settings. If all minions have the same values and your 190 | # setup is quite large (several thousand minions), they will still 191 | # flood the master. The desired behavior is to have timeframe within 192 | # all minions try to reconnect. 193 | # 194 | # Example on how to use these settings. The goal: have all minions reconnect within a 195 | # 60 second timeframe on a disconnect. 196 | # recon_default: 1000 197 | # recon_max: 59000 198 | # recon_randomize: True 199 | # 200 | # Each minion will have a randomized reconnect value between 'recon_default' 201 | # and 'recon_default + recon_max', which in this example means between 1000ms 202 | # 60000ms (or between 1 and 60 seconds). The generated random-value will be 203 | # doubled after each attempt to reconnect. Lets say the generated random 204 | # value is 11 seconds (or 11000ms). 205 | # reconnect 1: wait 11 seconds 206 | # reconnect 2: wait 22 seconds 207 | # reconnect 3: wait 33 seconds 208 | # reconnect 4: wait 44 seconds 209 | # reconnect 5: wait 55 seconds 210 | # reconnect 6: wait time is bigger than 60 seconds (recon_default + recon_max) 211 | # reconnect 7: wait 11 seconds 212 | # reconnect 8: wait 22 seconds 213 | # reconnect 9: wait 33 seconds 214 | # reconnect x: etc. 215 | # 216 | # In a setup with ~6000 thousand hosts these settings would average the reconnects 217 | # to about 100 per second and all hosts would be reconnected within 60 seconds. 218 | # recon_default: 100 219 | # recon_max: 5000 220 | # recon_randomize: False 221 | 222 | # The loop_interval sets how long in seconds the minion will wait between 223 | # evaluating the scheduler and running cleanup tasks. This defaults to a 224 | # sane 60 seconds, but if the minion scheduler needs to be evaluated more 225 | # often lower this value 226 | #loop_interval: 60 227 | 228 | # The grains_refresh_every setting allows for a minion to periodically check 229 | # its grains to see if they have changed and, if so, to inform the master 230 | # of the new grains. This operation is moderately expensive, therefore 231 | # care should be taken not to set this value too low. 232 | # 233 | # Note: This value is expressed in __minutes__! 234 | # 235 | # A value of 10 minutes is a reasonable default. 236 | # 237 | # If the value is set to zero, this check is disabled. 238 | #grains_refresh_every: 1 239 | 240 | # Cache grains on the minion. Default is False. 241 | #grains_cache: False 242 | 243 | # Grains cache expiration, in seconds. If the cache file is older than this 244 | # number of seconds then the grains cache will be dumped and fully re-populated 245 | # with fresh data. Defaults to 5 minutes. Will have no effect if 'grains_cache' 246 | # is not enabled. 247 | # grains_cache_expiration: 300 248 | 249 | # Windows platforms lack posix IPC and must rely on slower TCP based inter- 250 | # process communications. Set ipc_mode to 'tcp' on such systems 251 | #ipc_mode: ipc 252 | 253 | # Overwrite the default tcp ports used by the minion when in tcp mode 254 | #tcp_pub_port: 4510 255 | #tcp_pull_port: 4511 256 | 257 | # Passing very large events can cause the minion to consume large amounts of 258 | # memory. This value tunes the maximum size of a message allowed onto the 259 | # minion event bus. The value is expressed in bytes. 260 | #max_event_size: 1048576 261 | 262 | # The minion can include configuration from other files. To enable this, 263 | # pass a list of paths to this option. The paths can be either relative or 264 | # absolute; if relative, they are considered to be relative to the directory 265 | # the main minion configuration file lives in (this file). Paths can make use 266 | # of shell-style globbing. If no files are matched by a path passed to this 267 | # option then the minion will log a warning message. 268 | # 269 | # Include a config file from some other path: 270 | # include: /etc/salt/extra_config 271 | # 272 | # Include config from several files and directories: 273 | #include: 274 | # - /etc/salt/extra_config 275 | # - /etc/roles/webserver 276 | 277 | 278 | ##### Minion module management ##### 279 | ########################################## 280 | # Disable specific modules. This allows the admin to limit the level of 281 | # access the master has to the minion. 282 | #disable_modules: [cmd,test] 283 | #disable_returners: [] 284 | # 285 | # Modules can be loaded from arbitrary paths. This enables the easy deployment 286 | # of third party modules. Modules for returners and minions can be loaded. 287 | # Specify a list of extra directories to search for minion modules and 288 | # returners. These paths must be fully qualified! 289 | #module_dirs: [] 290 | #returner_dirs: [] 291 | #states_dirs: [] 292 | #render_dirs: [] 293 | #utils_dirs: [] 294 | # 295 | # A module provider can be statically overwritten or extended for the minion 296 | # via the providers option, in this case the default module will be 297 | # overwritten by the specified module. In this example the pkg module will 298 | # be provided by the yumpkg5 module instead of the system default. 299 | #providers: 300 | # pkg: yumpkg5 301 | # 302 | # Enable Cython modules searching and loading. (Default: False) 303 | #cython_enable: False 304 | # 305 | # Specify a max size (in bytes) for modules on import. This feature is currently 306 | # only supported on *nix operating systems and requires psutil. 307 | # modules_max_memory: -1 308 | 309 | 310 | ##### State Management Settings ##### 311 | ########################################### 312 | # The state management system executes all of the state templates on the minion 313 | # to enable more granular control of system state management. The type of 314 | # template and serialization used for state management needs to be configured 315 | # on the minion, the default renderer is yaml_jinja. This is a yaml file 316 | # rendered from a jinja template, the available options are: 317 | # yaml_jinja 318 | # yaml_mako 319 | # yaml_wempy 320 | # json_jinja 321 | # json_mako 322 | # json_wempy 323 | # 324 | #renderer: yaml_jinja 325 | # 326 | # The failhard option tells the minions to stop immediately after the first 327 | # failure detected in the state execution. Defaults to False. 328 | #failhard: False 329 | # 330 | # autoload_dynamic_modules turns on automatic loading of modules found in the 331 | # environments on the master. This is turned on by default. To turn of 332 | # autoloading modules when states run, set this value to False. 333 | #autoload_dynamic_modules: True 334 | # 335 | # clean_dynamic_modules keeps the dynamic modules on the minion in sync with 336 | # the dynamic modules on the master, this means that if a dynamic module is 337 | # not on the master it will be deleted from the minion. By default, this is 338 | # enabled and can be disabled by changing this value to False. 339 | #clean_dynamic_modules: True 340 | # 341 | # Normally, the minion is not isolated to any single environment on the master 342 | # when running states, but the environment can be isolated on the minion side 343 | # by statically setting it. Remember that the recommended way to manage 344 | # environments is to isolate via the top file. 345 | #environment: None 346 | # 347 | # If using the local file directory, then the state top file name needs to be 348 | # defined, by default this is top.sls. 349 | #state_top: top.sls 350 | # 351 | # Run states when the minion daemon starts. To enable, set startup_states to: 352 | # 'highstate' -- Execute state.highstate 353 | # 'sls' -- Read in the sls_list option and execute the named sls files 354 | # 'top' -- Read top_file option and execute based on that file on the Master 355 | #startup_states: '' 356 | # 357 | # List of states to run when the minion starts up if startup_states is 'sls': 358 | #sls_list: 359 | # - edit.vim 360 | # - hyper 361 | # 362 | # Top file to execute if startup_states is 'top': 363 | #top_file: '' 364 | 365 | 366 | ##### File Directory Settings ##### 367 | ########################################## 368 | # The Salt Minion can redirect all file server operations to a local directory, 369 | # this allows for the same state tree that is on the master to be used if 370 | # copied completely onto the minion. This is a literal copy of the settings on 371 | # the master but used to reference a local directory on the minion. 372 | 373 | # Set the file client. The client defaults to looking on the master server for 374 | # files, but can be directed to look at the local file directory setting 375 | # defined below by setting it to local. 376 | #file_client: remote 377 | 378 | # The file directory works on environments passed to the minion, each environment 379 | # can have multiple root directories, the subdirectories in the multiple file 380 | # roots cannot match, otherwise the downloaded files will not be able to be 381 | # reliably ensured. A base environment is required to house the top file. 382 | # Example: 383 | # file_roots: 384 | # base: 385 | # - /srv/salt/ 386 | # dev: 387 | # - /srv/salt/dev/services 388 | # - /srv/salt/dev/states 389 | # prod: 390 | # - /srv/salt/prod/services 391 | # - /srv/salt/prod/states 392 | # 393 | #file_roots: 394 | # base: 395 | # - /srv/salt 396 | 397 | # By default, the Salt fileserver recurses fully into all defined environments 398 | # to attempt to find files. To limit this behavior so that the fileserver only 399 | # traverses directories with SLS files and special Salt directories like _modules, 400 | # enable the option below. This might be useful for installations where a file root 401 | # has a very large number of files and performance is negatively impacted. Default 402 | # is False. 403 | #fileserver_limit_traversal: False 404 | 405 | # The hash_type is the hash to use when discovering the hash of a file in 406 | # the local fileserver. The default is md5, but sha1, sha224, sha256, sha384 407 | # and sha512 are also supported. 408 | # 409 | # Warning: Prior to changing this value, the minion should be stopped and all 410 | # Salt caches should be cleared. 411 | #hash_type: md5 412 | 413 | # The Salt pillar is searched for locally if file_client is set to local. If 414 | # this is the case, and pillar data is defined, then the pillar_roots need to 415 | # also be configured on the minion: 416 | #pillar_roots: 417 | # base: 418 | # - /srv/pillar 419 | 420 | 421 | ###### Security settings ##### 422 | ########################################### 423 | # Enable "open mode", this mode still maintains encryption, but turns off 424 | # authentication, this is only intended for highly secure environments or for 425 | # the situation where your keys end up in a bad state. If you run in open mode 426 | # you do so at your own risk! 427 | #open_mode: False 428 | 429 | # Enable permissive access to the salt keys. This allows you to run the 430 | # master or minion as root, but have a non-root group be given access to 431 | # your pki_dir. To make the access explicit, root must belong to the group 432 | # you've given access to. This is potentially quite insecure. 433 | #permissive_pki_access: False 434 | 435 | # The state_verbose and state_output settings can be used to change the way 436 | # state system data is printed to the display. By default all data is printed. 437 | # The state_verbose setting can be set to True or False, when set to False 438 | # all data that has a result of True and no changes will be suppressed. 439 | #state_verbose: True 440 | 441 | # The state_output setting changes if the output is the full multi line 442 | # output for each changed state if set to 'full', but if set to 'terse' 443 | # the output will be shortened to a single line. 444 | #state_output: full 445 | 446 | # The state_output_diff setting changes whether or not the output from 447 | # successful states is returned. Useful when even the terse output of these 448 | # states is cluttering the logs. Set it to True to ignore them. 449 | #state_output_diff: False 450 | 451 | # Fingerprint of the master public key to double verify the master is valid, 452 | # the master fingerprint can be found by running "salt-key -F master" on the 453 | # salt master. 454 | #master_finger: '' 455 | 456 | 457 | ###### Thread settings ##### 458 | ########################################### 459 | # Disable multiprocessing support, by default when a minion receives a 460 | # publication a new process is spawned and the command is executed therein. 461 | #multiprocessing: True 462 | 463 | 464 | ##### Logging settings ##### 465 | ########################################## 466 | # The location of the minion log file 467 | # The minion log can be sent to a regular file, local path name, or network 468 | # location. Remote logging works best when configured to use rsyslogd(8) (e.g.: 469 | # ``file:///dev/log``), with rsyslogd(8) configured for network logging. The URI 470 | # format is: ://:/ 471 | #log_file: /var/log/salt/minion 472 | #log_file: file:///dev/log 473 | #log_file: udp://loghost:10514 474 | # 475 | #log_file: /var/log/salt/minion 476 | #key_logfile: /var/log/salt/key 477 | 478 | # The level of messages to send to the console. 479 | # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'. 480 | # Default: 'warning' 481 | #log_level: warning 482 | 483 | # The level of messages to send to the log file. 484 | # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'. 485 | # Default: 'warning' 486 | #log_level_logfile: 487 | 488 | # The date and time format used in log messages. Allowed date/time formating 489 | # can be seen here: http://docs.python.org/library/time.html#time.strftime 490 | #log_datefmt: '%H:%M:%S' 491 | #log_datefmt_logfile: '%Y-%m-%d %H:%M:%S' 492 | 493 | # The format of the console logging messages. Allowed formatting options can 494 | # be seen here: http://docs.python.org/library/logging.html#logrecord-attributes 495 | #log_fmt_console: '[%(levelname)-8s] %(message)s' 496 | #log_fmt_logfile: '%(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s' 497 | 498 | # This can be used to control logging levels more specificically. This 499 | # example sets the main salt library at the 'warning' level, but sets 500 | # 'salt.modules' to log at the 'debug' level: 501 | # log_granular_levels: 502 | # 'salt': 'warning', 503 | # 'salt.modules': 'debug' 504 | # 505 | #log_granular_levels: {} 506 | 507 | 508 | ###### Module configuration ##### 509 | ########################################### 510 | # Salt allows for modules to be passed arbitrary configuration data, any data 511 | # passed here in valid yaml format will be passed on to the salt minion modules 512 | # for use. It is STRONGLY recommended that a naming convention be used in which 513 | # the module name is followed by a . and then the value. Also, all top level 514 | # data must be applied via the yaml dict construct, some examples: 515 | # 516 | # You can specify that all modules should run in test mode: 517 | #test: True 518 | # 519 | # A simple value for the test module: 520 | #test.foo: foo 521 | # 522 | # A list for the test module: 523 | #test.bar: [baz,quo] 524 | # 525 | # A dict for the test module: 526 | #test.baz: {spam: sausage, cheese: bread} 527 | 528 | 529 | ###### Update settings ###### 530 | ########################################### 531 | # Using the features in Esky, a salt minion can both run as a frozen app and 532 | # be updated on the fly. These options control how the update process 533 | # (saltutil.update()) behaves. 534 | # 535 | # The url for finding and downloading updates. Disabled by default. 536 | #update_url: False 537 | # 538 | # The list of services to restart after a successful update. Empty by default. 539 | #update_restart_services: [] 540 | 541 | 542 | ###### Keepalive settings ###### 543 | ############################################ 544 | # ZeroMQ now includes support for configuring SO_KEEPALIVE if supported by 545 | # the OS. If connections between the minion and the master pass through 546 | # a state tracking device such as a firewall or VPN gateway, there is 547 | # the risk that it could tear down the connection the master and minion 548 | # without informing either party that their connection has been taken away. 549 | # Enabling TCP Keepalives prevents this from happening. 550 | 551 | # Overall state of TCP Keepalives, enable (1 or True), disable (0 or False) 552 | # or leave to the OS defaults (-1), on Linux, typically disabled. Default True, enabled. 553 | #tcp_keepalive: True 554 | 555 | # How long before the first keepalive should be sent in seconds. Default 300 556 | # to send the first keepalive after 5 minutes, OS default (-1) is typically 7200 seconds 557 | # on Linux see /proc/sys/net/ipv4/tcp_keepalive_time. 558 | #tcp_keepalive_idle: 300 559 | 560 | # How many lost probes are needed to consider the connection lost. Default -1 561 | # to use OS defaults, typically 9 on Linux, see /proc/sys/net/ipv4/tcp_keepalive_probes. 562 | #tcp_keepalive_cnt: -1 563 | 564 | # How often, in seconds, to send keepalives after the first one. Default -1 to 565 | # use OS defaults, typically 75 seconds on Linux, see 566 | # /proc/sys/net/ipv4/tcp_keepalive_intvl. 567 | #tcp_keepalive_intvl: -1 568 | 569 | 570 | ###### Windows Software settings ###### 571 | ############################################ 572 | # Location of the repository cache file on the master: 573 | #win_repo_cachefile: 'salt://win/repo/winrepo.p' 574 | -------------------------------------------------------------------------------- /saltstack/etc/minion2: -------------------------------------------------------------------------------- 1 | ##### Primary configuration settings ##### 2 | ########################################## 3 | # This configuration file is used to manage the behavior of the Salt Minion. 4 | # With the exception of the location of the Salt Master Server, values that 5 | # are commented out but have no space after the comment are defaults that need 6 | # not be set in the config. If there is a space after the comment that the value 7 | # is presented as an example and is not the default. 8 | 9 | # Per default the minion will automatically include all config files 10 | # from minion.d/*.conf (minion.d is a directory in the same directory 11 | # as the main minion config file). 12 | #default_include: minion.d/*.conf 13 | 14 | # Set the location of the salt master server. If the master server cannot be 15 | # resolved, then the minion will fail to start. 16 | #master: salt 17 | master: 192.168.56.10 18 | 19 | # If multiple masters are specified in the 'master' setting, the default behavior 20 | # is to always try to connect to them in the order they are listed. If random_master is 21 | # set to True, the order will be randomized instead. This can be helpful in distributing 22 | # the load of many minions executing salt-call requests, for example, from a cron job. 23 | # If only one master is listed, this setting is ignored and a warning will be logged. 24 | #random_master: False 25 | 26 | # Set whether the minion should connect to the master via IPv6: 27 | #ipv6: False 28 | 29 | # Set the number of seconds to wait before attempting to resolve 30 | # the master hostname if name resolution fails. Defaults to 30 seconds. 31 | # Set to zero if the minion should shutdown and not retry. 32 | # retry_dns: 30 33 | 34 | # Set the port used by the master reply and authentication server. 35 | #master_port: 4506 36 | 37 | # The user to run salt. 38 | #user: root 39 | 40 | # Specify the location of the daemon process ID file. 41 | #pidfile: /var/run/salt-minion.pid 42 | 43 | # The root directory prepended to these options: pki_dir, cachedir, log_file, 44 | # sock_dir, pidfile. 45 | #root_dir: / 46 | 47 | # The directory to store the pki information in 48 | #pki_dir: /etc/salt/pki/minion 49 | 50 | # Explicitly declare the id for this minion to use, if left commented the id 51 | # will be the hostname as returned by the python call: socket.getfqdn() 52 | # Since salt uses detached ids it is possible to run multiple minions on the 53 | # same machine but with different ids, this can be useful for salt compute 54 | # clusters. 55 | #id: 56 | id: minion2 57 | 58 | # Append a domain to a hostname in the event that it does not exist. This is 59 | # useful for systems where socket.getfqdn() does not actually result in a 60 | # FQDN (for instance, Solaris). 61 | #append_domain: 62 | 63 | # Custom static grains for this minion can be specified here and used in SLS 64 | # files just like all other grains. This example sets 4 custom grains, with 65 | # the 'roles' grain having two values that can be matched against. 66 | #grains: 67 | # roles: 68 | # - webserver 69 | # - memcache 70 | # deployment: datacenter4 71 | # cabinet: 13 72 | # cab_u: 14-15 73 | 74 | # Where cache data goes. 75 | #cachedir: /var/cache/salt/minion 76 | 77 | # Verify and set permissions on configuration directories at startup. 78 | #verify_env: True 79 | 80 | # The minion can locally cache the return data from jobs sent to it, this 81 | # can be a good way to keep track of jobs the minion has executed 82 | # (on the minion side). By default this feature is disabled, to enable, set 83 | # cache_jobs to True. 84 | #cache_jobs: False 85 | 86 | # Set the directory used to hold unix sockets. 87 | #sock_dir: /var/run/salt/minion 88 | 89 | # Set the default outputter used by the salt-call command. The default is 90 | # "nested". 91 | #output: nested 92 | # 93 | # By default output is colored. To disable colored output, set the color value 94 | # to False. 95 | #color: True 96 | 97 | # Do not strip off the colored output from nested results and state outputs 98 | # (true by default). 99 | # strip_colors: False 100 | 101 | # Backup files that are replaced by file.managed and file.recurse under 102 | # 'cachedir'/file_backups relative to their original location and appended 103 | # with a timestamp. The only valid setting is "minion". Disabled by default. 104 | # 105 | # Alternatively this can be specified for each file in state files: 106 | # /etc/ssh/sshd_config: 107 | # file.managed: 108 | # - source: salt://ssh/sshd_config 109 | # - backup: minion 110 | # 111 | #backup_mode: minion 112 | 113 | # When waiting for a master to accept the minion's public key, salt will 114 | # continuously attempt to reconnect until successful. This is the time, in 115 | # seconds, between those reconnection attempts. 116 | #acceptance_wait_time: 10 117 | 118 | # If this is nonzero, the time between reconnection attempts will increase by 119 | # acceptance_wait_time seconds per iteration, up to this maximum. If this is 120 | # set to zero, the time between reconnection attempts will stay constant. 121 | #acceptance_wait_time_max: 0 122 | 123 | # If the master rejects the minion's public key, retry instead of exiting. 124 | # Rejected keys will be handled the same as waiting on acceptance. 125 | #rejected_retry: False 126 | 127 | # When the master key changes, the minion will try to re-auth itself to receive 128 | # the new master key. In larger environments this can cause a SYN flood on the 129 | # master because all minions try to re-auth immediately. To prevent this and 130 | # have a minion wait for a random amount of time, use this optional parameter. 131 | # The wait-time will be a random number of seconds between 0 and the defined value. 132 | #random_reauth_delay: 60 133 | 134 | # When waiting for a master to accept the minion's public key, salt will 135 | # continuously attempt to reconnect until successful. This is the timeout value, 136 | # in seconds, for each individual attempt. After this timeout expires, the minion 137 | # will wait for acceptance_wait_time seconds before trying again. Unless your master 138 | # is under unusually heavy load, this should be left at the default. 139 | #auth_timeout: 60 140 | 141 | # Number of consecutive SaltReqTimeoutError that are acceptable when trying to 142 | # authenticate. 143 | #auth_tries: 7 144 | 145 | # If authentication fails due to SaltReqTimeoutError during a ping_interval, 146 | # cause sub minion process to restart. 147 | #auth_safemode: False 148 | 149 | # Ping Master to ensure connection is alive (minutes). 150 | #ping_interval: 0 151 | 152 | # To auto recover minions if master changes IP address (DDNS) 153 | # auth_tries: 10 154 | # auth_safemode: False 155 | # ping_interval: 90 156 | # restart_on_error: True 157 | # 158 | # Minions won't know master is missing until a ping fails. After the ping fail, 159 | # the minion will attempt authentication and likely fails out and cause a restart. 160 | # When the minion restarts it will resolve the masters IP and attempt to reconnect. 161 | 162 | # If you don't have any problems with syn-floods, don't bother with the 163 | # three recon_* settings described below, just leave the defaults! 164 | # 165 | # The ZeroMQ pull-socket that binds to the masters publishing interface tries 166 | # to reconnect immediately, if the socket is disconnected (for example if 167 | # the master processes are restarted). In large setups this will have all 168 | # minions reconnect immediately which might flood the master (the ZeroMQ-default 169 | # is usually a 100ms delay). To prevent this, these three recon_* settings 170 | # can be used. 171 | # recon_default: the interval in milliseconds that the socket should wait before 172 | # trying to reconnect to the master (1000ms = 1 second) 173 | # 174 | # recon_max: the maximum time a socket should wait. each interval the time to wait 175 | # is calculated by doubling the previous time. if recon_max is reached, 176 | # it starts again at recon_default. Short example: 177 | # 178 | # reconnect 1: the socket will wait 'recon_default' milliseconds 179 | # reconnect 2: 'recon_default' * 2 180 | # reconnect 3: ('recon_default' * 2) * 2 181 | # reconnect 4: value from previous interval * 2 182 | # reconnect 5: value from previous interval * 2 183 | # reconnect x: if value >= recon_max, it starts again with recon_default 184 | # 185 | # recon_randomize: generate a random wait time on minion start. The wait time will 186 | # be a random value between recon_default and recon_default + 187 | # recon_max. Having all minions reconnect with the same recon_default 188 | # and recon_max value kind of defeats the purpose of being able to 189 | # change these settings. If all minions have the same values and your 190 | # setup is quite large (several thousand minions), they will still 191 | # flood the master. The desired behavior is to have timeframe within 192 | # all minions try to reconnect. 193 | # 194 | # Example on how to use these settings. The goal: have all minions reconnect within a 195 | # 60 second timeframe on a disconnect. 196 | # recon_default: 1000 197 | # recon_max: 59000 198 | # recon_randomize: True 199 | # 200 | # Each minion will have a randomized reconnect value between 'recon_default' 201 | # and 'recon_default + recon_max', which in this example means between 1000ms 202 | # 60000ms (or between 1 and 60 seconds). The generated random-value will be 203 | # doubled after each attempt to reconnect. Lets say the generated random 204 | # value is 11 seconds (or 11000ms). 205 | # reconnect 1: wait 11 seconds 206 | # reconnect 2: wait 22 seconds 207 | # reconnect 3: wait 33 seconds 208 | # reconnect 4: wait 44 seconds 209 | # reconnect 5: wait 55 seconds 210 | # reconnect 6: wait time is bigger than 60 seconds (recon_default + recon_max) 211 | # reconnect 7: wait 11 seconds 212 | # reconnect 8: wait 22 seconds 213 | # reconnect 9: wait 33 seconds 214 | # reconnect x: etc. 215 | # 216 | # In a setup with ~6000 thousand hosts these settings would average the reconnects 217 | # to about 100 per second and all hosts would be reconnected within 60 seconds. 218 | # recon_default: 100 219 | # recon_max: 5000 220 | # recon_randomize: False 221 | 222 | # The loop_interval sets how long in seconds the minion will wait between 223 | # evaluating the scheduler and running cleanup tasks. This defaults to a 224 | # sane 60 seconds, but if the minion scheduler needs to be evaluated more 225 | # often lower this value 226 | #loop_interval: 60 227 | 228 | # The grains_refresh_every setting allows for a minion to periodically check 229 | # its grains to see if they have changed and, if so, to inform the master 230 | # of the new grains. This operation is moderately expensive, therefore 231 | # care should be taken not to set this value too low. 232 | # 233 | # Note: This value is expressed in __minutes__! 234 | # 235 | # A value of 10 minutes is a reasonable default. 236 | # 237 | # If the value is set to zero, this check is disabled. 238 | #grains_refresh_every: 1 239 | 240 | # Cache grains on the minion. Default is False. 241 | #grains_cache: False 242 | 243 | # Grains cache expiration, in seconds. If the cache file is older than this 244 | # number of seconds then the grains cache will be dumped and fully re-populated 245 | # with fresh data. Defaults to 5 minutes. Will have no effect if 'grains_cache' 246 | # is not enabled. 247 | # grains_cache_expiration: 300 248 | 249 | # Windows platforms lack posix IPC and must rely on slower TCP based inter- 250 | # process communications. Set ipc_mode to 'tcp' on such systems 251 | #ipc_mode: ipc 252 | 253 | # Overwrite the default tcp ports used by the minion when in tcp mode 254 | #tcp_pub_port: 4510 255 | #tcp_pull_port: 4511 256 | 257 | # Passing very large events can cause the minion to consume large amounts of 258 | # memory. This value tunes the maximum size of a message allowed onto the 259 | # minion event bus. The value is expressed in bytes. 260 | #max_event_size: 1048576 261 | 262 | # The minion can include configuration from other files. To enable this, 263 | # pass a list of paths to this option. The paths can be either relative or 264 | # absolute; if relative, they are considered to be relative to the directory 265 | # the main minion configuration file lives in (this file). Paths can make use 266 | # of shell-style globbing. If no files are matched by a path passed to this 267 | # option then the minion will log a warning message. 268 | # 269 | # Include a config file from some other path: 270 | # include: /etc/salt/extra_config 271 | # 272 | # Include config from several files and directories: 273 | #include: 274 | # - /etc/salt/extra_config 275 | # - /etc/roles/webserver 276 | 277 | 278 | ##### Minion module management ##### 279 | ########################################## 280 | # Disable specific modules. This allows the admin to limit the level of 281 | # access the master has to the minion. 282 | #disable_modules: [cmd,test] 283 | #disable_returners: [] 284 | # 285 | # Modules can be loaded from arbitrary paths. This enables the easy deployment 286 | # of third party modules. Modules for returners and minions can be loaded. 287 | # Specify a list of extra directories to search for minion modules and 288 | # returners. These paths must be fully qualified! 289 | #module_dirs: [] 290 | #returner_dirs: [] 291 | #states_dirs: [] 292 | #render_dirs: [] 293 | #utils_dirs: [] 294 | # 295 | # A module provider can be statically overwritten or extended for the minion 296 | # via the providers option, in this case the default module will be 297 | # overwritten by the specified module. In this example the pkg module will 298 | # be provided by the yumpkg5 module instead of the system default. 299 | #providers: 300 | # pkg: yumpkg5 301 | # 302 | # Enable Cython modules searching and loading. (Default: False) 303 | #cython_enable: False 304 | # 305 | # Specify a max size (in bytes) for modules on import. This feature is currently 306 | # only supported on *nix operating systems and requires psutil. 307 | # modules_max_memory: -1 308 | 309 | 310 | ##### State Management Settings ##### 311 | ########################################### 312 | # The state management system executes all of the state templates on the minion 313 | # to enable more granular control of system state management. The type of 314 | # template and serialization used for state management needs to be configured 315 | # on the minion, the default renderer is yaml_jinja. This is a yaml file 316 | # rendered from a jinja template, the available options are: 317 | # yaml_jinja 318 | # yaml_mako 319 | # yaml_wempy 320 | # json_jinja 321 | # json_mako 322 | # json_wempy 323 | # 324 | #renderer: yaml_jinja 325 | # 326 | # The failhard option tells the minions to stop immediately after the first 327 | # failure detected in the state execution. Defaults to False. 328 | #failhard: False 329 | # 330 | # autoload_dynamic_modules turns on automatic loading of modules found in the 331 | # environments on the master. This is turned on by default. To turn of 332 | # autoloading modules when states run, set this value to False. 333 | #autoload_dynamic_modules: True 334 | # 335 | # clean_dynamic_modules keeps the dynamic modules on the minion in sync with 336 | # the dynamic modules on the master, this means that if a dynamic module is 337 | # not on the master it will be deleted from the minion. By default, this is 338 | # enabled and can be disabled by changing this value to False. 339 | #clean_dynamic_modules: True 340 | # 341 | # Normally, the minion is not isolated to any single environment on the master 342 | # when running states, but the environment can be isolated on the minion side 343 | # by statically setting it. Remember that the recommended way to manage 344 | # environments is to isolate via the top file. 345 | #environment: None 346 | # 347 | # If using the local file directory, then the state top file name needs to be 348 | # defined, by default this is top.sls. 349 | #state_top: top.sls 350 | # 351 | # Run states when the minion daemon starts. To enable, set startup_states to: 352 | # 'highstate' -- Execute state.highstate 353 | # 'sls' -- Read in the sls_list option and execute the named sls files 354 | # 'top' -- Read top_file option and execute based on that file on the Master 355 | #startup_states: '' 356 | # 357 | # List of states to run when the minion starts up if startup_states is 'sls': 358 | #sls_list: 359 | # - edit.vim 360 | # - hyper 361 | # 362 | # Top file to execute if startup_states is 'top': 363 | #top_file: '' 364 | 365 | 366 | ##### File Directory Settings ##### 367 | ########################################## 368 | # The Salt Minion can redirect all file server operations to a local directory, 369 | # this allows for the same state tree that is on the master to be used if 370 | # copied completely onto the minion. This is a literal copy of the settings on 371 | # the master but used to reference a local directory on the minion. 372 | 373 | # Set the file client. The client defaults to looking on the master server for 374 | # files, but can be directed to look at the local file directory setting 375 | # defined below by setting it to local. 376 | #file_client: remote 377 | 378 | # The file directory works on environments passed to the minion, each environment 379 | # can have multiple root directories, the subdirectories in the multiple file 380 | # roots cannot match, otherwise the downloaded files will not be able to be 381 | # reliably ensured. A base environment is required to house the top file. 382 | # Example: 383 | # file_roots: 384 | # base: 385 | # - /srv/salt/ 386 | # dev: 387 | # - /srv/salt/dev/services 388 | # - /srv/salt/dev/states 389 | # prod: 390 | # - /srv/salt/prod/services 391 | # - /srv/salt/prod/states 392 | # 393 | #file_roots: 394 | # base: 395 | # - /srv/salt 396 | 397 | # By default, the Salt fileserver recurses fully into all defined environments 398 | # to attempt to find files. To limit this behavior so that the fileserver only 399 | # traverses directories with SLS files and special Salt directories like _modules, 400 | # enable the option below. This might be useful for installations where a file root 401 | # has a very large number of files and performance is negatively impacted. Default 402 | # is False. 403 | #fileserver_limit_traversal: False 404 | 405 | # The hash_type is the hash to use when discovering the hash of a file in 406 | # the local fileserver. The default is md5, but sha1, sha224, sha256, sha384 407 | # and sha512 are also supported. 408 | # 409 | # Warning: Prior to changing this value, the minion should be stopped and all 410 | # Salt caches should be cleared. 411 | #hash_type: md5 412 | 413 | # The Salt pillar is searched for locally if file_client is set to local. If 414 | # this is the case, and pillar data is defined, then the pillar_roots need to 415 | # also be configured on the minion: 416 | #pillar_roots: 417 | # base: 418 | # - /srv/pillar 419 | 420 | 421 | ###### Security settings ##### 422 | ########################################### 423 | # Enable "open mode", this mode still maintains encryption, but turns off 424 | # authentication, this is only intended for highly secure environments or for 425 | # the situation where your keys end up in a bad state. If you run in open mode 426 | # you do so at your own risk! 427 | #open_mode: False 428 | 429 | # Enable permissive access to the salt keys. This allows you to run the 430 | # master or minion as root, but have a non-root group be given access to 431 | # your pki_dir. To make the access explicit, root must belong to the group 432 | # you've given access to. This is potentially quite insecure. 433 | #permissive_pki_access: False 434 | 435 | # The state_verbose and state_output settings can be used to change the way 436 | # state system data is printed to the display. By default all data is printed. 437 | # The state_verbose setting can be set to True or False, when set to False 438 | # all data that has a result of True and no changes will be suppressed. 439 | #state_verbose: True 440 | 441 | # The state_output setting changes if the output is the full multi line 442 | # output for each changed state if set to 'full', but if set to 'terse' 443 | # the output will be shortened to a single line. 444 | #state_output: full 445 | 446 | # The state_output_diff setting changes whether or not the output from 447 | # successful states is returned. Useful when even the terse output of these 448 | # states is cluttering the logs. Set it to True to ignore them. 449 | #state_output_diff: False 450 | 451 | # Fingerprint of the master public key to double verify the master is valid, 452 | # the master fingerprint can be found by running "salt-key -F master" on the 453 | # salt master. 454 | #master_finger: '' 455 | 456 | 457 | ###### Thread settings ##### 458 | ########################################### 459 | # Disable multiprocessing support, by default when a minion receives a 460 | # publication a new process is spawned and the command is executed therein. 461 | #multiprocessing: True 462 | 463 | 464 | ##### Logging settings ##### 465 | ########################################## 466 | # The location of the minion log file 467 | # The minion log can be sent to a regular file, local path name, or network 468 | # location. Remote logging works best when configured to use rsyslogd(8) (e.g.: 469 | # ``file:///dev/log``), with rsyslogd(8) configured for network logging. The URI 470 | # format is: ://:/ 471 | #log_file: /var/log/salt/minion 472 | #log_file: file:///dev/log 473 | #log_file: udp://loghost:10514 474 | # 475 | #log_file: /var/log/salt/minion 476 | #key_logfile: /var/log/salt/key 477 | 478 | # The level of messages to send to the console. 479 | # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'. 480 | # Default: 'warning' 481 | #log_level: warning 482 | 483 | # The level of messages to send to the log file. 484 | # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'. 485 | # Default: 'warning' 486 | #log_level_logfile: 487 | 488 | # The date and time format used in log messages. Allowed date/time formating 489 | # can be seen here: http://docs.python.org/library/time.html#time.strftime 490 | #log_datefmt: '%H:%M:%S' 491 | #log_datefmt_logfile: '%Y-%m-%d %H:%M:%S' 492 | 493 | # The format of the console logging messages. Allowed formatting options can 494 | # be seen here: http://docs.python.org/library/logging.html#logrecord-attributes 495 | #log_fmt_console: '[%(levelname)-8s] %(message)s' 496 | #log_fmt_logfile: '%(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s' 497 | 498 | # This can be used to control logging levels more specificically. This 499 | # example sets the main salt library at the 'warning' level, but sets 500 | # 'salt.modules' to log at the 'debug' level: 501 | # log_granular_levels: 502 | # 'salt': 'warning', 503 | # 'salt.modules': 'debug' 504 | # 505 | #log_granular_levels: {} 506 | 507 | 508 | ###### Module configuration ##### 509 | ########################################### 510 | # Salt allows for modules to be passed arbitrary configuration data, any data 511 | # passed here in valid yaml format will be passed on to the salt minion modules 512 | # for use. It is STRONGLY recommended that a naming convention be used in which 513 | # the module name is followed by a . and then the value. Also, all top level 514 | # data must be applied via the yaml dict construct, some examples: 515 | # 516 | # You can specify that all modules should run in test mode: 517 | #test: True 518 | # 519 | # A simple value for the test module: 520 | #test.foo: foo 521 | # 522 | # A list for the test module: 523 | #test.bar: [baz,quo] 524 | # 525 | # A dict for the test module: 526 | #test.baz: {spam: sausage, cheese: bread} 527 | 528 | 529 | ###### Update settings ###### 530 | ########################################### 531 | # Using the features in Esky, a salt minion can both run as a frozen app and 532 | # be updated on the fly. These options control how the update process 533 | # (saltutil.update()) behaves. 534 | # 535 | # The url for finding and downloading updates. Disabled by default. 536 | #update_url: False 537 | # 538 | # The list of services to restart after a successful update. Empty by default. 539 | #update_restart_services: [] 540 | 541 | 542 | ###### Keepalive settings ###### 543 | ############################################ 544 | # ZeroMQ now includes support for configuring SO_KEEPALIVE if supported by 545 | # the OS. If connections between the minion and the master pass through 546 | # a state tracking device such as a firewall or VPN gateway, there is 547 | # the risk that it could tear down the connection the master and minion 548 | # without informing either party that their connection has been taken away. 549 | # Enabling TCP Keepalives prevents this from happening. 550 | 551 | # Overall state of TCP Keepalives, enable (1 or True), disable (0 or False) 552 | # or leave to the OS defaults (-1), on Linux, typically disabled. Default True, enabled. 553 | #tcp_keepalive: True 554 | 555 | # How long before the first keepalive should be sent in seconds. Default 300 556 | # to send the first keepalive after 5 minutes, OS default (-1) is typically 7200 seconds 557 | # on Linux see /proc/sys/net/ipv4/tcp_keepalive_time. 558 | #tcp_keepalive_idle: 300 559 | 560 | # How many lost probes are needed to consider the connection lost. Default -1 561 | # to use OS defaults, typically 9 on Linux, see /proc/sys/net/ipv4/tcp_keepalive_probes. 562 | #tcp_keepalive_cnt: -1 563 | 564 | # How often, in seconds, to send keepalives after the first one. Default -1 to 565 | # use OS defaults, typically 75 seconds on Linux, see 566 | # /proc/sys/net/ipv4/tcp_keepalive_intvl. 567 | #tcp_keepalive_intvl: -1 568 | 569 | 570 | ###### Windows Software settings ###### 571 | ############################################ 572 | # Location of the repository cache file on the master: 573 | #win_repo_cachefile: 'salt://win/repo/winrepo.p' 574 | -------------------------------------------------------------------------------- /saltstack/etc/master: -------------------------------------------------------------------------------- 1 | ##### Primary configuration settings ##### 2 | ########################################## 3 | # This configuration file is used to manage the behavior of the Salt Master. 4 | # Values that are commented out but have no space after the comment are 5 | # defaults that need not be set in the config. If there is a space after the 6 | # comment that the value is presented as an example and is not the default. 7 | 8 | # Per default, the master will automatically include all config files 9 | # from master.d/*.conf (master.d is a directory in the same directory 10 | # as the main master config file). 11 | #default_include: master.d/*.conf 12 | 13 | # The address of the interface to bind to: 14 | #interface: 0.0.0.0 15 | 16 | # Whether the master should listen for IPv6 connections. If this is set to True, 17 | # the interface option must be adjusted, too. (For example: "interface: '::'") 18 | #ipv6: False 19 | 20 | # The tcp port used by the publisher: 21 | #publish_port: 4505 22 | 23 | # The user under which the salt master will run. Salt will update all 24 | # permissions to allow the specified user to run the master. The exception is 25 | # the job cache, which must be deleted if this user is changed. If the 26 | # modified files cause conflicts, set verify_env to False. 27 | #user: root 28 | 29 | # Max open files 30 | # 31 | # Each minion connecting to the master uses AT LEAST one file descriptor, the 32 | # master subscription connection. If enough minions connect you might start 33 | # seeing on the console (and then salt-master crashes): 34 | # Too many open files (tcp_listener.cpp:335) 35 | # Aborted (core dumped) 36 | # 37 | # By default this value will be the one of `ulimit -Hn`, ie, the hard limit for 38 | # max open files. 39 | # 40 | # If you wish to set a different value than the default one, uncomment and 41 | # configure this setting. Remember that this value CANNOT be higher than the 42 | # hard limit. Raising the hard limit depends on your OS and/or distribution, 43 | # a good way to find the limit is to search the internet. For example: 44 | # raise max open files hard limit debian 45 | # 46 | #max_open_files: 100000 47 | 48 | # The number of worker threads to start. These threads are used to manage 49 | # return calls made from minions to the master. If the master seems to be 50 | # running slowly, increase the number of threads. 51 | #worker_threads: 5 52 | 53 | # The port used by the communication interface. The ret (return) port is the 54 | # interface used for the file server, authentication, job returns, etc. 55 | #ret_port: 4506 56 | 57 | # Specify the location of the daemon process ID file: 58 | #pidfile: /var/run/salt-master.pid 59 | 60 | # The root directory prepended to these options: pki_dir, cachedir, 61 | # sock_dir, log_file, autosign_file, autoreject_file, extension_modules, 62 | # key_logfile, pidfile: 63 | #root_dir: / 64 | 65 | # Directory used to store public key data: 66 | #pki_dir: /etc/salt/pki/master 67 | 68 | # Directory to store job and cache data: 69 | #cachedir: /var/cache/salt/master 70 | 71 | # Directory for custom modules. This directory can contain subdirectories for 72 | # each of Salt's module types such as "runners", "output", "wheel", "modules", 73 | # "states", "returners", etc. 74 | #extension_modules: 75 | 76 | # Verify and set permissions on configuration directories at startup: 77 | #verify_env: True 78 | 79 | # Set the number of hours to keep old job information in the job cache: 80 | #keep_jobs: 24 81 | 82 | # Set the default timeout for the salt command and api. The default is 5 83 | # seconds. 84 | #timeout: 5 85 | 86 | # The loop_interval option controls the seconds for the master's maintenance 87 | # process check cycle. This process updates file server backends, cleans the 88 | # job cache and executes the scheduler. 89 | #loop_interval: 60 90 | 91 | # Set the default outputter used by the salt command. The default is "nested". 92 | #output: nested 93 | 94 | # Return minions that timeout when running commands like test.ping 95 | #show_timeout: True 96 | 97 | # By default, output is colored. To disable colored output, set the color value 98 | # to False. 99 | #color: True 100 | 101 | # Do not strip off the colored output from nested results and state outputs 102 | # (true by default). 103 | # strip_colors: False 104 | 105 | # Set the directory used to hold unix sockets: 106 | #sock_dir: /var/run/salt/master 107 | 108 | # The master can take a while to start up when lspci and/or dmidecode is used 109 | # to populate the grains for the master. Enable if you want to see GPU hardware 110 | # data for your master. 111 | # enable_gpu_grains: False 112 | 113 | # The master maintains a job cache. While this is a great addition, it can be 114 | # a burden on the master for larger deployments (over 5000 minions). 115 | # Disabling the job cache will make previously executed jobs unavailable to 116 | # the jobs system and is not generally recommended. 117 | #job_cache: True 118 | 119 | # Cache minion grains and pillar data in the cachedir. 120 | #minion_data_cache: True 121 | 122 | # Passing very large events can cause the minion to consume large amounts of 123 | # memory. This value tunes the maximum size of a message allowed onto the 124 | # master event bus. The value is expressed in bytes. 125 | #max_event_size: 1048576 126 | 127 | # By default, the master AES key rotates every 24 hours. The next command 128 | # following a key rotation will trigger a key refresh from the minion which may 129 | # result in minions which do not respond to the first command after a key refresh. 130 | # 131 | # To tell the master to ping all minions immediately after an AES key refresh, set 132 | # ping_on_rotate to True. This should mitigate the issue where a minion does not 133 | # appear to initially respond after a key is rotated. 134 | # 135 | # Note that ping_on_rotate may cause high load on the master immediately after 136 | # the key rotation event as minions reconnect. Consider this carefully if this 137 | # salt master is managing a large number of minions. 138 | # 139 | # If disabled, it is recommended to handle this event by listening for the 140 | # 'aes_key_rotate' event with the 'key' tag and acting appropriately. 141 | # ping_on_rotate: False 142 | 143 | # If max_minions is used in large installations, the master might experience 144 | # high-load situations because of having to check the number of connected 145 | # minions for every authentication. This cache provides the minion-ids of 146 | # all connected minions to all MWorker-processes and greatly improves the 147 | # performance of max_minions. 148 | # con_cache: False 149 | 150 | # The master can include configuration from other files. To enable this, 151 | # pass a list of paths to this option. The paths can be either relative or 152 | # absolute; if relative, they are considered to be relative to the directory 153 | # the main master configuration file lives in (this file). Paths can make use 154 | # of shell-style globbing. If no files are matched by a path passed to this 155 | # option, then the master will log a warning message. 156 | # 157 | # Include a config file from some other path: 158 | #include: /etc/salt/extra_config 159 | # 160 | # Include config from several files and directories: 161 | #include: 162 | # - /etc/salt/extra_config 163 | 164 | 165 | ##### Security settings ##### 166 | ########################################## 167 | # Enable "open mode", this mode still maintains encryption, but turns off 168 | # authentication, this is only intended for highly secure environments or for 169 | # the situation where your keys end up in a bad state. If you run in open mode 170 | # you do so at your own risk! 171 | #open_mode: False 172 | 173 | # Enable auto_accept, this setting will automatically accept all incoming 174 | # public keys from the minions. Note that this is insecure. 175 | #auto_accept: False 176 | 177 | # Time in minutes that a incoming public key with a matching name found in 178 | # pki_dir/minion_autosign/keyid is automatically accepted. Expired autosign keys 179 | # are removed when the master checks the minion_autosign directory. 180 | # 0 equals no timeout 181 | # autosign_timeout: 120 182 | 183 | # If the autosign_file is specified, incoming keys specified in the 184 | # autosign_file will be automatically accepted. This is insecure. Regular 185 | # expressions as well as globing lines are supported. 186 | #autosign_file: /etc/salt/autosign.conf 187 | 188 | # Works like autosign_file, but instead allows you to specify minion IDs for 189 | # which keys will automatically be rejected. Will override both membership in 190 | # the autosign_file and the auto_accept setting. 191 | #autoreject_file: /etc/salt/autoreject.conf 192 | 193 | # Enable permissive access to the salt keys. This allows you to run the 194 | # master or minion as root, but have a non-root group be given access to 195 | # your pki_dir. To make the access explicit, root must belong to the group 196 | # you've given access to. This is potentially quite insecure. If an autosign_file 197 | # is specified, enabling permissive_pki_access will allow group access to that 198 | # specific file. 199 | #permissive_pki_access: False 200 | 201 | # Allow users on the master access to execute specific commands on minions. 202 | # This setting should be treated with care since it opens up execution 203 | # capabilities to non root users. By default this capability is completely 204 | # disabled. 205 | #client_acl: 206 | # larry: 207 | # - test.ping 208 | # - network.* 209 | 210 | # Blacklist any of the following users or modules 211 | # 212 | # This example would blacklist all non sudo users, including root from 213 | # running any commands. It would also blacklist any use of the "cmd" 214 | # module. This is completely disabled by default. 215 | # 216 | #client_acl_blacklist: 217 | # users: 218 | # - root 219 | # - '^(?!sudo_).*$' # all non sudo users 220 | # modules: 221 | # - cmd 222 | 223 | # The external auth system uses the Salt auth modules to authenticate and 224 | # validate users to access areas of the Salt system. 225 | #external_auth: 226 | # pam: 227 | # fred: 228 | # - test.* 229 | 230 | # Time (in seconds) for a newly generated token to live. Default: 12 hours 231 | #token_expire: 43200 232 | 233 | # Allow minions to push files to the master. This is disabled by default, for 234 | # security purposes. 235 | #file_recv: False 236 | 237 | # Set a hard-limit on the size of the files that can be pushed to the master. 238 | # It will be interpreted as megabytes. Default: 100 239 | #file_recv_max_size: 100 240 | 241 | # Signature verification on messages published from the master. 242 | # This causes the master to cryptographically sign all messages published to its event 243 | # bus, and minions then verify that signature before acting on the message. 244 | # 245 | # This is False by default. 246 | # 247 | # Note that to facilitate interoperability with masters and minions that are different 248 | # versions, if sign_pub_messages is True but a message is received by a minion with 249 | # no signature, it will still be accepted, and a warning message will be logged. 250 | # Conversely, if sign_pub_messages is False, but a minion receives a signed 251 | # message it will be accepted, the signature will not be checked, and a warning message 252 | # will be logged. This behavior went away in Salt 2014.1.0 and these two situations 253 | # will cause minion to throw an exception and drop the message. 254 | # sign_pub_messages: False 255 | 256 | 257 | ##### Master Module Management ##### 258 | ########################################## 259 | # Manage how master side modules are loaded. 260 | 261 | # Add any additional locations to look for master runners: 262 | #runner_dirs: [] 263 | 264 | # Enable Cython for master side modules: 265 | #cython_enable: False 266 | 267 | 268 | ##### State System settings ##### 269 | ########################################## 270 | # The state system uses a "top" file to tell the minions what environment to 271 | # use and what modules to use. The state_top file is defined relative to the 272 | # root of the base environment as defined in "File Server settings" below. 273 | #state_top: top.sls 274 | 275 | # The master_tops option replaces the external_nodes option by creating 276 | # a plugable system for the generation of external top data. The external_nodes 277 | # option is deprecated by the master_tops option. 278 | # 279 | # To gain the capabilities of the classic external_nodes system, use the 280 | # following configuration: 281 | # master_tops: 282 | # ext_nodes: 283 | # 284 | #master_tops: {} 285 | 286 | # The external_nodes option allows Salt to gather data that would normally be 287 | # placed in a top file. The external_nodes option is the executable that will 288 | # return the ENC data. Remember that Salt will look for external nodes AND top 289 | # files and combine the results if both are enabled! 290 | #external_nodes: None 291 | 292 | # The renderer to use on the minions to render the state data 293 | #renderer: yaml_jinja 294 | 295 | # The Jinja renderer can strip extra carriage returns and whitespace 296 | # See http://jinja.pocoo.org/docs/api/#high-level-api 297 | # 298 | # If this is set to True the first newline after a Jinja block is removed 299 | # (block, not variable tag!). Defaults to False, corresponds to the Jinja 300 | # environment init variable "trim_blocks". 301 | # jinja_trim_blocks: False 302 | # 303 | # If this is set to True leading spaces and tabs are stripped from the start 304 | # of a line to a block. Defaults to False, corresponds to the Jinja 305 | # environment init variable "lstrip_blocks". 306 | # jinja_lstrip_blocks: False 307 | 308 | # The failhard option tells the minions to stop immediately after the first 309 | # failure detected in the state execution, defaults to False 310 | #failhard: False 311 | 312 | # The state_verbose and state_output settings can be used to change the way 313 | # state system data is printed to the display. By default all data is printed. 314 | # The state_verbose setting can be set to True or False, when set to False 315 | # all data that has a result of True and no changes will be suppressed. 316 | #state_verbose: True 317 | 318 | # The state_output setting changes if the output is the full multi line 319 | # output for each changed state if set to 'full', but if set to 'terse' 320 | # the output will be shortened to a single line. If set to 'mixed', the output 321 | # will be terse unless a state failed, in which case that output will be full. 322 | # If set to 'changes', the output will be full unless the state didn't change. 323 | #state_output: full 324 | 325 | 326 | ##### File Server settings ##### 327 | ########################################## 328 | # Salt runs a lightweight file server written in zeromq to deliver files to 329 | # minions. This file server is built into the master daemon and does not 330 | # require a dedicated port. 331 | 332 | # The file server works on environments passed to the master, each environment 333 | # can have multiple root directories, the subdirectories in the multiple file 334 | # roots cannot match, otherwise the downloaded files will not be able to be 335 | # reliably ensured. A base environment is required to house the top file. 336 | # Example: 337 | # file_roots: 338 | # base: 339 | # - /srv/salt/ 340 | # dev: 341 | # - /srv/salt/dev/services 342 | # - /srv/salt/dev/states 343 | # prod: 344 | # - /srv/salt/prod/services 345 | # - /srv/salt/prod/states 346 | 347 | #file_roots: 348 | # base: 349 | # - /srv/salt 350 | 351 | # The hash_type is the hash to use when discovering the hash of a file on 352 | # the master server. The default is md5, but sha1, sha224, sha256, sha384 353 | # and sha512 are also supported. 354 | # 355 | # Prior to changing this value, the master should be stopped and all Salt 356 | # caches should be cleared. 357 | #hash_type: md5 358 | 359 | # The buffer size in the file server can be adjusted here: 360 | #file_buffer_size: 1048576 361 | 362 | # A regular expression (or a list of expressions) that will be matched 363 | # against the file path before syncing the modules and states to the minions. 364 | # This includes files affected by the file.recurse state. 365 | # For example, if you manage your custom modules and states in subversion 366 | # and don't want all the '.svn' folders and content synced to your minions, 367 | # you could set this to '/\.svn($|/)'. By default nothing is ignored. 368 | #file_ignore_regex: 369 | # - '/\.svn($|/)' 370 | # - '/\.git($|/)' 371 | 372 | # A file glob (or list of file globs) that will be matched against the file 373 | # path before syncing the modules and states to the minions. This is similar 374 | # to file_ignore_regex above, but works on globs instead of regex. By default 375 | # nothing is ignored. 376 | # file_ignore_glob: 377 | # - '*.pyc' 378 | # - '*/somefolder/*.bak' 379 | # - '*.swp' 380 | 381 | # File Server Backend 382 | # 383 | # Salt supports a modular fileserver backend system, this system allows 384 | # the salt master to link directly to third party systems to gather and 385 | # manage the files available to minions. Multiple backends can be 386 | # configured and will be searched for the requested file in the order in which 387 | # they are defined here. The default setting only enables the standard backend 388 | # "roots" which uses the "file_roots" option. 389 | #fileserver_backend: 390 | # - roots 391 | # 392 | # To use multiple backends list them in the order they are searched: 393 | #fileserver_backend: 394 | # - git 395 | # - roots 396 | # 397 | # Uncomment the line below if you do not want the file_server to follow 398 | # symlinks when walking the filesystem tree. This is set to True 399 | # by default. Currently this only applies to the default roots 400 | # fileserver_backend. 401 | #fileserver_followsymlinks: False 402 | # 403 | # Uncomment the line below if you do not want symlinks to be 404 | # treated as the files they are pointing to. By default this is set to 405 | # False. By uncommenting the line below, any detected symlink while listing 406 | # files on the Master will not be returned to the Minion. 407 | #fileserver_ignoresymlinks: True 408 | # 409 | # By default, the Salt fileserver recurses fully into all defined environments 410 | # to attempt to find files. To limit this behavior so that the fileserver only 411 | # traverses directories with SLS files and special Salt directories like _modules, 412 | # enable the option below. This might be useful for installations where a file root 413 | # has a very large number of files and performance is impacted. Default is False. 414 | # fileserver_limit_traversal: False 415 | # 416 | # The fileserver can fire events off every time the fileserver is updated, 417 | # these are disabled by default, but can be easily turned on by setting this 418 | # flag to True 419 | #fileserver_events: False 420 | 421 | # Git File Server Backend Configuration 422 | # 423 | # Gitfs can be provided by one of two python modules: GitPython or pygit2. If 424 | # using pygit2, both libgit2 and git must also be installed. 425 | #gitfs_provider: gitpython 426 | # 427 | # When using the git fileserver backend at least one git remote needs to be 428 | # defined. The user running the salt master will need read access to the repo. 429 | # 430 | # The repos will be searched in order to find the file requested by a client 431 | # and the first repo to have the file will return it. 432 | # When using the git backend branches and tags are translated into salt 433 | # environments. 434 | # Note: file:// repos will be treated as a remote, so refs you want used must 435 | # exist in that repo as *local* refs. 436 | #gitfs_remotes: 437 | # - git://github.com/saltstack/salt-states.git 438 | # - file:///var/git/saltmaster 439 | # 440 | # The gitfs_ssl_verify option specifies whether to ignore ssl certificate 441 | # errors when contacting the gitfs backend. You might want to set this to 442 | # false if you're using a git backend that uses a self-signed certificate but 443 | # keep in mind that setting this flag to anything other than the default of True 444 | # is a security concern, you may want to try using the ssh transport. 445 | #gitfs_ssl_verify: True 446 | # 447 | # The gitfs_root option gives the ability to serve files from a subdirectory 448 | # within the repository. The path is defined relative to the root of the 449 | # repository and defaults to the repository root. 450 | #gitfs_root: somefolder/otherfolder 451 | 452 | 453 | ##### Pillar settings ##### 454 | ########################################## 455 | # Salt Pillars allow for the building of global data that can be made selectively 456 | # available to different minions based on minion grain filtering. The Salt 457 | # Pillar is laid out in the same fashion as the file server, with environments, 458 | # a top file and sls files. However, pillar data does not need to be in the 459 | # highstate format, and is generally just key/value pairs. 460 | #pillar_roots: 461 | # base: 462 | # - /srv/pillar 463 | # 464 | #ext_pillar: 465 | # - hiera: /etc/hiera.yaml 466 | # - cmd_yaml: cat /etc/salt/yaml 467 | 468 | # The ext_pillar_first option allows for external pillar sources to populate 469 | # before file system pillar. This allows for targeting file system pillar from 470 | # ext_pillar. 471 | #ext_pillar_first: False 472 | 473 | # The pillar_gitfs_ssl_verify option specifies whether to ignore ssl certificate 474 | # errors when contacting the pillar gitfs backend. You might want to set this to 475 | # false if you're using a git backend that uses a self-signed certificate but 476 | # keep in mind that setting this flag to anything other than the default of True 477 | # is a security concern, you may want to try using the ssh transport. 478 | #pillar_gitfs_ssl_verify: True 479 | 480 | # The pillar_opts option adds the master configuration file data to a dict in 481 | # the pillar called "master". This is used to set simple configurations in the 482 | # master config file that can then be used on minions. 483 | #pillar_opts: True 484 | 485 | 486 | ##### Syndic settings ##### 487 | ########################################## 488 | # The Salt syndic is used to pass commands through a master from a higher 489 | # master. Using the syndic is simple, if this is a master that will have 490 | # syndic servers(s) below it set the "order_masters" setting to True, if this 491 | # is a master that will be running a syndic daemon for passthrough the 492 | # "syndic_master" setting needs to be set to the location of the master server 493 | # to receive commands from. 494 | 495 | # Set the order_masters setting to True if this master will command lower 496 | # masters' syndic interfaces. 497 | #order_masters: False 498 | 499 | # If this master will be running a salt syndic daemon, syndic_master tells 500 | # this master where to receive commands from. 501 | #syndic_master: masterofmaster 502 | 503 | # This is the 'ret_port' of the MasterOfMaster: 504 | #syndic_master_port: 4506 505 | 506 | # PID file of the syndic daemon: 507 | #syndic_pidfile: /var/run/salt-syndic.pid 508 | 509 | # LOG file of the syndic daemon: 510 | #syndic_log_file: syndic.log 511 | 512 | 513 | ##### Peer Publish settings ##### 514 | ########################################## 515 | # Salt minions can send commands to other minions, but only if the minion is 516 | # allowed to. By default "Peer Publication" is disabled, and when enabled it 517 | # is enabled for specific minions and specific commands. This allows secure 518 | # compartmentalization of commands based on individual minions. 519 | 520 | # The configuration uses regular expressions to match minions and then a list 521 | # of regular expressions to match functions. The following will allow the 522 | # minion authenticated as foo.example.com to execute functions from the test 523 | # and pkg modules. 524 | #peer: 525 | # foo.example.com: 526 | # - test.* 527 | # - pkg.* 528 | # 529 | # This will allow all minions to execute all commands: 530 | #peer: 531 | # .*: 532 | # - .* 533 | # 534 | # This is not recommended, since it would allow anyone who gets root on any 535 | # single minion to instantly have root on all of the minions! 536 | 537 | # Minions can also be allowed to execute runners from the salt master. 538 | # Since executing a runner from the minion could be considered a security risk, 539 | # it needs to be enabled. This setting functions just like the peer setting 540 | # except that it opens up runners instead of module functions. 541 | # 542 | # All peer runner support is turned off by default and must be enabled before 543 | # using. This will enable all peer runners for all minions: 544 | #peer_run: 545 | # .*: 546 | # - .* 547 | # 548 | # To enable just the manage.up runner for the minion foo.example.com: 549 | #peer_run: 550 | # foo.example.com: 551 | # - manage.up 552 | 553 | 554 | ##### Mine settings ##### 555 | ########################################## 556 | # Restrict mine.get access from minions. By default any minion has a full access 557 | # to get all mine data from master cache. In acl definion below, only pcre matches 558 | # are allowed. 559 | # mine_get: 560 | # .*: 561 | # - .* 562 | # 563 | # The example below enables minion foo.example.com to get 'network.interfaces' mine 564 | # data only, minions web* to get all network.* and disk.* mine data and all other 565 | # minions won't get any mine data. 566 | # mine_get: 567 | # foo.example.com: 568 | # - network.interfaces 569 | # web.*: 570 | # - network.* 571 | # - disk.* 572 | 573 | 574 | ##### Logging settings ##### 575 | ########################################## 576 | # The location of the master log file 577 | # The master log can be sent to a regular file, local path name, or network 578 | # location. Remote logging works best when configured to use rsyslogd(8) (e.g.: 579 | # ``file:///dev/log``), with rsyslogd(8) configured for network logging. The URI 580 | # format is: ://:/ 581 | #log_file: /var/log/salt/master 582 | #log_file: file:///dev/log 583 | #log_file: udp://loghost:10514 584 | 585 | #log_file: /var/log/salt/master 586 | #key_logfile: /var/log/salt/key 587 | 588 | # The level of messages to send to the console. 589 | # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'. 590 | #log_level: warning 591 | 592 | # The level of messages to send to the log file. 593 | # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'. 594 | #log_level_logfile: warning 595 | 596 | # The date and time format used in log messages. Allowed date/time formating 597 | # can be seen here: http://docs.python.org/library/time.html#time.strftime 598 | #log_datefmt: '%H:%M:%S' 599 | #log_datefmt_logfile: '%Y-%m-%d %H:%M:%S' 600 | 601 | # The format of the console logging messages. Allowed formatting options can 602 | # be seen here: http://docs.python.org/library/logging.html#logrecord-attributes 603 | #log_fmt_console: '[%(levelname)-8s] %(message)s' 604 | #log_fmt_logfile: '%(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s' 605 | 606 | # This can be used to control logging levels more specificically. This 607 | # example sets the main salt library at the 'warning' level, but sets 608 | # 'salt.modules' to log at the 'debug' level: 609 | # log_granular_levels: 610 | # 'salt': 'warning', 611 | # 'salt.modules': 'debug' 612 | # 613 | #log_granular_levels: {} 614 | 615 | 616 | ##### Node Groups ##### 617 | ########################################## 618 | # Node groups allow for logical groupings of minion nodes. A group consists of a group 619 | # name and a compound target. 620 | #nodegroups: 621 | # group1: 'L@foo.domain.com,bar.domain.com,baz.domain.com and bl*.domain.com' 622 | # group2: 'G@os:Debian and foo.domain.com' 623 | 624 | 625 | ##### Range Cluster settings ##### 626 | ########################################## 627 | # The range server (and optional port) that serves your cluster information 628 | # https://github.com/ytoolshed/range/wiki/%22yamlfile%22-module-file-spec 629 | # 630 | #range_server: range:80 631 | 632 | 633 | ##### Windows Software Repo settings ##### 634 | ############################################## 635 | # Location of the repo on the master: 636 | #win_repo: '/srv/salt/win/repo' 637 | 638 | # Location of the master's repo cache file: 639 | #win_repo_mastercachefile: '/srv/salt/win/repo/winrepo.p' 640 | 641 | # List of git repositories to include with the local repo: 642 | #win_gitrepos: 643 | # - 'https://github.com/saltstack/salt-winrepo.git' 644 | --------------------------------------------------------------------------------