├── tests ├── __init__.py ├── unit │ ├── __init__.py │ ├── utils │ │ ├── __init__.py │ │ └── filebuffer_test.py │ ├── modules │ │ ├── __init__.py │ │ └── file_test.py │ ├── states │ │ └── __init__.py │ ├── templates │ │ ├── __init__.py │ │ └── files │ │ │ └── test │ │ │ ├── hello_simple │ │ │ ├── hello_include │ │ │ ├── macro │ │ │ └── hello_import │ └── simple.py └── integration │ ├── client │ ├── __init__.py │ └── syndic.py │ ├── modules │ ├── __init__.py │ ├── files │ │ └── hosts │ ├── rabbitmq.py │ └── pillar.py │ ├── runners │ └── __init__.py │ ├── shell │ ├── __init__.py │ ├── master.py │ ├── minion.py │ └── syndic.py │ ├── states │ ├── __init__.py │ ├── compiler.py │ ├── cmd.py │ ├── rabbitmq_vhost.py │ └── host.py │ ├── files │ ├── file │ │ └── base │ │ │ ├── grail │ │ │ └── empty │ │ │ ├── top.sls │ │ │ ├── issue-1959-virtualenv-runas │ │ │ ├── requirements.txt │ │ │ └── init.sls │ │ │ ├── cheese │ │ │ ├── core.sls │ │ │ ├── issue-2167-exsel-match.sls │ │ │ ├── issue-1879 │ │ │ ├── init.sls │ │ │ ├── step-2.sls │ │ │ └── step-1.sls │ │ │ ├── testappend │ │ │ ├── init.sls │ │ │ ├── step-2.sls │ │ │ ├── step-1.sls │ │ │ ├── secondif │ │ │ ├── issue-2227.sls │ │ │ └── firstif │ │ │ ├── fuzz │ │ │ └── multi_state.sls │ │ │ ├── hello.patch │ │ │ ├── to-include-test.sls │ │ │ ├── hello_dolly.patch │ │ │ ├── include-test.sls │ │ │ ├── issue-1876.sls │ │ │ ├── issue-2087-missing-pip.sls │ │ │ ├── exclude-test.sls │ │ │ ├── pip-installed-errors.sls │ │ │ ├── recurse_fail.sls │ │ │ ├── recurse_ok_two.sls │ │ │ ├── recurse_ok.sls │ │ │ ├── issue-2068-template-str.sls │ │ │ ├── issue-2028-pip-installed.sls │ │ │ ├── issue-2068-template-str-no-dot.sls │ │ │ ├── pip-installed-weird-install.sls │ │ │ ├── testfile │ │ │ └── _modules │ │ │ └── runtests_helpers.py │ ├── pillar │ │ └── base │ │ │ ├── sub.sls │ │ │ ├── top.sls │ │ │ └── generic.sls │ ├── ext.yaml │ ├── conf │ │ ├── syndic_master │ │ ├── syndic │ │ ├── master │ │ ├── minion │ │ └── sub_minion │ ├── ssh │ │ ├── raw │ │ ├── authorized_keys │ │ └── known_hosts │ └── hosts │ └── mockbin │ └── su ├── debian ├── compat ├── source │ └── format ├── salt-common.manpages ├── salt-syndic.manpages ├── salt-doc.install ├── salt-minion.manpages ├── salt-common.dirs ├── salt-master.dirs ├── salt-minion.dirs ├── salt-syndic.install ├── salt-master.manpages ├── salt-common.install ├── salt-minion.install ├── salt-common.lintian-overrides ├── salt-master.install ├── rules └── salt-doc.doc-base ├── salt ├── grains │ ├── __init__.py │ ├── opts.py │ └── extra.py ├── states │ ├── __init__.py │ ├── stateconf.py │ └── pkgng.py ├── tops │ └── __init__.py ├── modules │ ├── __init__.py │ ├── rh_ip │ │ ├── conf.jinja │ │ ├── network.jinja │ │ ├── rh5_eth.jinja │ │ └── rh6_eth.jinja │ ├── key.py │ ├── eix.py │ ├── monit.py │ ├── event.py │ ├── win_shadow.py │ └── qemu_img.py ├── renderers │ ├── __init__.py │ ├── json.py │ ├── wempy.py │ ├── mako.py │ └── py.py ├── returners │ ├── __init__.py │ ├── local.py │ └── syslog_return.py ├── runners │ ├── __init__.py │ ├── fileserver.py │ ├── search.py │ └── launchd.py ├── ext │ └── __init__.py ├── output │ ├── no_out.py │ ├── raw.py │ ├── pprint_out.py │ ├── yaml_out.py │ ├── json_out.py │ ├── txt.py │ └── overstatestage.py ├── utils │ ├── dictupdate.py │ └── winapi.py ├── pillar │ ├── cmd_json.py │ ├── cmd_yaml.py │ ├── puppet.py │ └── hiera.py ├── wheel │ ├── config.py │ └── key.py └── auth │ └── keystone.py ├── pkg ├── windows │ ├── buildenv │ │ ├── var │ │ │ ├── run │ │ │ │ └── empty.txt │ │ │ ├── log │ │ │ │ └── salt │ │ │ │ │ └── minion │ │ │ └── cache │ │ │ │ └── salt │ │ │ │ └── minion │ │ │ │ ├── proc │ │ │ │ └── empty.txt │ │ │ │ └── extmods │ │ │ │ └── grains │ │ │ │ └── empty.txt │ │ ├── conf │ │ │ └── pki │ │ │ │ └── minion │ │ │ │ └── empty.txt │ │ ├── nssm.exe │ │ └── salt.ico │ └── installer │ │ ├── salt.ico │ │ └── LICENSE.txt ├── arch │ ├── salt-master.service │ ├── salt-minion.service │ ├── salt-syndic.service │ ├── Makefile │ └── PKGBUILD-local ├── rpm │ ├── salt-master.service │ ├── salt-minion.service │ ├── salt-syndic.service │ ├── README.fedora │ └── 0001-Only-expect-args-if-they-are-actually-passed-in.patch ├── salt-syndic.upstart ├── salt-minion.service ├── salt-master.service ├── salt-syndic.service ├── salt-master.upstart ├── salt-minion.upstart ├── salt.ufw ├── salt-common.logrotate ├── freeze │ └── freeze.py └── ebuild │ ├── salt-0.8.7.ebuild │ └── salt-0.7.0.ebuild ├── doc ├── _themes │ └── saltstack │ │ ├── static │ │ ├── js │ │ │ └── main.js │ │ ├── salt-horiz.png │ │ ├── fonts │ │ │ ├── .DS_Store │ │ │ ├── nexa-light.eot │ │ │ ├── nexa-light.ttf │ │ │ ├── nexa-light.woff │ │ │ ├── nexa-xbold.eot │ │ │ ├── nexa-xbold.ttf │ │ │ ├── nexa-xbold.woff │ │ │ ├── nexa-light-italic.eot │ │ │ ├── nexa-light-italic.ttf │ │ │ ├── nexa-xbold-italic.eot │ │ │ ├── nexa-xbold-italic.ttf │ │ │ ├── nexa-light-italic.woff │ │ │ ├── nexa-xbold-italic.woff │ │ │ ├── nexa-light.css │ │ │ ├── nexa-xbold.css │ │ │ ├── nexa-light-italic.css │ │ │ └── nexa-xbold-italic.css │ │ ├── images │ │ │ ├── footerBG.jpg │ │ │ ├── socialFB.png │ │ │ ├── socialG+.png │ │ │ ├── socialLI.png │ │ │ ├── socialTW.png │ │ │ ├── heroImages.jpg │ │ │ ├── heroScale.jpg │ │ │ ├── heroSpeed.jpg │ │ │ ├── ssWeAreHere.jpg │ │ │ ├── theRegister.jpg │ │ │ ├── heroGetSalted.jpg │ │ │ ├── socialFB-dark.png │ │ │ ├── socialG-dark.png │ │ │ ├── socialGitHub.png │ │ │ ├── socialLI-dark.png │ │ │ ├── socialTW-dark.png │ │ │ ├── ssServicesCPS.jpg │ │ │ ├── SaltStack-Logo.png │ │ │ ├── githubTopTenOSS.png │ │ │ ├── heroTakeControl.jpg │ │ │ ├── ssClientProduct.png │ │ │ ├── ssCloudProduct.png │ │ │ ├── ssServerProduct.png │ │ │ ├── ssSupportProduct.png │ │ │ ├── cloudOrchestration.png │ │ │ ├── heroHeadlineScale.png │ │ │ ├── heroHeadlineSpeed.png │ │ │ ├── saltStackScale11X.png │ │ │ ├── socialGitHub-dark.png │ │ │ ├── cloudOrchestration2.png │ │ │ ├── heroHeadlineControl.png │ │ │ ├── heroHeadlineGetSalted.png │ │ │ ├── aboutSaltStackLogoGraphic.png │ │ │ ├── blackDuckRookieoftheYear.png │ │ │ ├── ssServicesOnsiteTraining.jpg │ │ │ └── ssServicesRegionalTraining.jpg │ │ └── img │ │ │ ├── carouselLeft.png │ │ │ ├── carouselRight.png │ │ │ ├── navCurrentArrow.png │ │ │ ├── glyphicons-halflings.png │ │ │ └── glyphicons-halflings-white.png │ │ └── theme.conf ├── _static │ ├── favicon.ico │ ├── book_open.png │ ├── film_link.png │ ├── salt-vert.png │ ├── saltstack_logo.png │ └── page_white_acrobat.png ├── ref │ ├── states │ │ ├── all │ │ │ ├── salt.states.hg.rst │ │ │ ├── salt.states.cmd.rst │ │ │ ├── salt.states.gem.rst │ │ │ ├── salt.states.pip.rst │ │ │ ├── salt.states.pkg.rst │ │ │ ├── salt.states.rvm.rst │ │ │ ├── salt.states.svn.rst │ │ │ ├── salt.states.cron.rst │ │ │ ├── salt.states.file.rst │ │ │ ├── salt.states.git.rst │ │ │ ├── salt.states.host.rst │ │ │ ├── salt.states.kmod.rst │ │ │ ├── salt.states.pecl.rst │ │ │ ├── salt.states.user.rst │ │ │ ├── salt.states.group.rst │ │ │ ├── salt.states.mount.rst │ │ │ ├── salt.states.pkgng.rst │ │ │ ├── salt.states.alias.rst │ │ │ ├── salt.states.grains.rst │ │ │ ├── salt.states.locale.rst │ │ │ ├── salt.states.module.rst │ │ │ ├── salt.states.sysctl.rst │ │ │ ├── salt.states.layman.rst │ │ │ ├── salt.states.pkgrepo.rst │ │ │ ├── salt.states.service.rst │ │ │ ├── salt.states.keyboard.rst │ │ │ ├── salt.states.makeconf.rst │ │ │ ├── salt.states.network.rst │ │ │ ├── salt.states.selinux.rst │ │ │ ├── salt.states.ssh_auth.rst │ │ │ ├── salt.states.timezone.rst │ │ │ ├── salt.states.stateconf.rst │ │ │ ├── salt.states.debconfmod.rst │ │ │ ├── salt.states.mysql_user.rst │ │ │ ├── salt.states.supervisord.rst │ │ │ ├── salt.states.alternatives.rst │ │ │ ├── salt.states.mongodb_user.rst │ │ │ ├── salt.states.mysql_grants.rst │ │ │ ├── salt.states.postgres_user.rst │ │ │ ├── salt.states.rabbitmq_user.rst │ │ │ ├── salt.states.mysql_database.rst │ │ │ ├── salt.states.rabbitmq_vhost.rst │ │ │ ├── salt.states.postgres_group.rst │ │ │ ├── salt.states.mongodb_database.rst │ │ │ ├── salt.states.ssh_known_hosts.rst │ │ │ ├── salt.states.postgres_database.rst │ │ │ ├── salt.states.virtualenv.rst │ │ │ └── index.rst │ │ ├── include.rst │ │ ├── backup_mode.rst │ │ ├── testing.rst │ │ └── startup.rst │ ├── wheel │ │ └── all │ │ │ ├── salt.wheel.key.rst │ │ │ ├── salt.wheel.config.rst │ │ │ ├── salt.wheel.file_roots.rst │ │ │ ├── salt.wheel.pillar_roots.rst │ │ │ └── index.rst │ ├── internals │ │ ├── salt.exceptions.rst │ │ ├── index.rst │ │ └── exceptions.rst │ ├── modules │ │ └── all │ │ │ ├── salt.modules.at.rst │ │ │ ├── salt.modules.cp.rst │ │ │ ├── salt.modules.hg.rst │ │ │ ├── salt.modules.ps.rst │ │ │ ├── salt.modules.apt.rst │ │ │ ├── salt.modules.gem.rst │ │ │ ├── salt.modules.git.rst │ │ │ ├── salt.modules.pam.rst │ │ │ ├── salt.modules.pip.rst │ │ │ ├── salt.modules.ret.rst │ │ │ ├── salt.modules.rvm.rst │ │ │ ├── salt.modules.smf.rst │ │ │ ├── salt.modules.ssh.rst │ │ │ ├── salt.modules.svn.rst │ │ │ ├── salt.modules.tls.rst │ │ │ ├── salt.modules.cron.rst │ │ │ ├── salt.modules.data.rst │ │ │ ├── salt.modules.disk.rst │ │ │ ├── salt.modules.eix.rst │ │ │ ├── salt.modules.file.rst │ │ │ ├── salt.modules.kmod.rst │ │ │ ├── salt.modules.nova.rst │ │ │ ├── salt.modules.pecl.rst │ │ │ ├── salt.modules.reg.rst │ │ │ ├── salt.modules.solr.rst │ │ │ ├── salt.modules.test.rst │ │ │ ├── salt.modules.virt.rst │ │ │ ├── salt.modules.bluez.rst │ │ │ ├── salt.modules.brew.rst │ │ │ ├── salt.modules.event.rst │ │ │ ├── salt.modules.extfs.rst │ │ │ ├── salt.modules.hosts.rst │ │ │ ├── salt.modules.mdadm.rst │ │ │ ├── salt.modules.monit.rst │ │ │ ├── salt.modules.mount.rst │ │ │ ├── salt.modules.mysql.rst │ │ │ ├── salt.modules.nginx.rst │ │ │ ├── salt.modules.pkgng.rst │ │ │ ├── salt.modules.state.rst │ │ │ ├── salt.modules.zpool.rst │ │ │ ├── salt.modules.apache.rst │ │ │ ├── salt.modules.config.rst │ │ │ ├── salt.modules.ebuild.rst │ │ │ ├── salt.modules.glance.rst │ │ │ ├── salt.modules.grains.rst │ │ │ ├── salt.modules.locale.rst │ │ │ ├── salt.modules.nzbget.rst │ │ │ ├── salt.modules.pacman.rst │ │ │ ├── salt.modules.parted.rst │ │ │ ├── salt.modules.puppet.rst │ │ │ ├── salt.modules.rh_ip.rst │ │ │ ├── salt.modules.shadow.rst │ │ │ ├── salt.modules.status.rst │ │ │ ├── salt.modules.sysmod.rst │ │ │ ├── salt.modules.tomcat.rst │ │ │ ├── salt.modules.archive.rst │ │ │ ├── salt.modules.cmdmod.rst │ │ │ ├── salt.modules.layman.rst │ │ │ ├── salt.modules.ldapmod.rst │ │ │ ├── salt.modules.mongodb.rst │ │ │ ├── salt.modules.moosefs.rst │ │ │ ├── salt.modules.network.rst │ │ │ ├── salt.modules.pkgutil.rst │ │ │ ├── salt.modules.publish.rst │ │ │ ├── salt.modules.pw_user.rst │ │ │ ├── salt.modules.selinux.rst │ │ │ ├── salt.modules.service.rst │ │ │ ├── salt.modules.systemd.rst │ │ │ ├── salt.modules.upstart.rst │ │ │ ├── salt.modules.useradd.rst │ │ │ ├── salt.modules.yumpkg5.rst │ │ │ ├── salt.modules.aliases.rst │ │ │ ├── salt.modules.groupadd.rst │ │ │ ├── salt.modules.iptables.rst │ │ │ ├── salt.modules.keyboard.rst │ │ │ ├── salt.modules.keystone.rst │ │ │ ├── salt.modules.pw_group.rst │ │ │ ├── salt.modules.rabbitmq.rst │ │ │ ├── salt.modules.saltutil.rst │ │ │ ├── salt.modules.sqlite3.rst │ │ │ ├── salt.modules.sysbench.rst │ │ │ ├── salt.modules.timezone.rst │ │ │ ├── salt.modules.win_disk.rst │ │ │ ├── salt.modules.win_file.rst │ │ │ ├── salt.modules.win_pkg.rst │ │ │ ├── salt.modules.butterkvm.rst │ │ │ ├── salt.modules.cassandra.rst │ │ │ ├── salt.modules.djangomod.rst │ │ │ ├── salt.modules.linux_acl.rst │ │ │ ├── salt.modules.linux_lvm.rst │ │ │ ├── salt.modules.makeconf.rst │ │ │ ├── salt.modules.postgres.rst │ │ │ ├── salt.modules.poudriere.rst │ │ │ ├── salt.modules.augeas_cfg.rst │ │ │ ├── salt.modules.debconfmod.rst │ │ │ ├── salt.modules.freebsdpkg.rst │ │ │ ├── salt.modules.kvm_hyper.rst │ │ │ ├── salt.modules.launchctl.rst │ │ │ ├── salt.modules.openbsdpkg.rst │ │ │ ├── salt.modules.rh_service.rst │ │ │ ├── salt.modules.solarispkg.rst │ │ │ ├── salt.modules.virtualenv.rst │ │ │ ├── salt.modules.win_shadow.rst │ │ │ ├── salt.modules.win_status.rst │ │ │ ├── salt.modules.daemontools.rst │ │ │ ├── salt.modules.freebsdkmod.rst │ │ │ ├── salt.modules.grub_legacy.rst │ │ │ ├── salt.modules.osxdesktop.rst │ │ │ ├── salt.modules.supervisord.rst │ │ │ ├── salt.modules.win_network.rst │ │ │ ├── salt.modules.win_service.rst │ │ │ ├── salt.modules.win_useradd.rst │ │ │ ├── salt.modules.alternatives.rst │ │ │ ├── salt.modules.freebsdjail.rst │ │ │ ├── salt.modules.linux_sysctl.rst │ │ │ ├── salt.modules.pkg_resource.rst │ │ │ ├── salt.modules.solaris_user.rst │ │ │ ├── salt.modules.solaris_group.rst │ │ │ ├── salt.modules.win_groupadd.rst │ │ │ ├── salt.modules.debian_service.rst │ │ │ ├── salt.modules.freebsd_sysctl.rst │ │ │ ├── salt.modules.freebsdservice.rst │ │ │ ├── salt.modules.gentoo_service.rst │ │ │ ├── salt.modules.gentoolkitmod.rst │ │ │ ├── salt.modules.openbsdservice.rst │ │ │ ├── salt.modules.pillar.rst │ │ │ ├── salt.modules.solaris_shadow.rst │ │ │ ├── salt.modules.zypper.rst │ │ │ ├── salt.modules.yumpkg.rst │ │ │ └── salt.modules.pkg.rst │ ├── output │ │ └── all │ │ │ ├── salt.output.key.rst │ │ │ ├── salt.output.raw.rst │ │ │ ├── salt.output.txt.rst │ │ │ ├── salt.output.grains.rst │ │ │ ├── salt.output.nested.rst │ │ │ ├── salt.output.json_out.rst │ │ │ ├── salt.output.yaml_out.rst │ │ │ ├── salt.output.highstate.rst │ │ │ ├── salt.output.pprint_out.rst │ │ │ ├── salt.output.overstatestage.rst │ │ │ └── index.rst │ ├── runners │ │ └── all │ │ │ ├── salt.runners.doc.rst │ │ │ ├── salt.runners.jobs.rst │ │ │ ├── salt.runners.cache.rst │ │ │ ├── salt.runners.state.rst │ │ │ ├── salt.runners.manage.rst │ │ │ ├── salt.runners.search.rst │ │ │ ├── salt.runners.launchd.rst │ │ │ ├── salt.runners.network.rst │ │ │ ├── salt.runners.winrepo.rst │ │ │ └── index.rst │ ├── pillar │ │ ├── all │ │ │ ├── salt.pillar.hiera.rst │ │ │ ├── salt.pillar.mongo.rst │ │ │ ├── salt.pillar.cmd_json.rst │ │ │ ├── salt.pillar.puppet.rst │ │ │ ├── salt.pillar.cmd_yaml.rst │ │ │ ├── salt.pillar.pillar_ldap.rst │ │ │ └── index.rst │ │ └── index.rst │ ├── renderers │ │ └── all │ │ │ ├── salt.renderers.py.rst │ │ │ ├── salt.renderers.json.rst │ │ │ ├── salt.renderers.mako.rst │ │ │ ├── salt.renderers.yaml.rst │ │ │ ├── salt.renderers.pydsl.rst │ │ │ ├── salt.renderers.wempy.rst │ │ │ └── index.rst │ ├── tops │ │ ├── all │ │ │ ├── salt.tops.ext_nodes.rst │ │ │ └── index.rst │ │ └── index.rst │ ├── returners │ │ └── all │ │ │ ├── salt.returners.local.rst │ │ │ ├── salt.returners.mysql.rst │ │ │ ├── salt.returners.postgres.rst │ │ │ ├── salt.returners.smtp_return.rst │ │ │ ├── salt.returners.redis_return.rst │ │ │ ├── salt.returners.mongo_return.rst │ │ │ ├── salt.returners.syslog_return.rst │ │ │ ├── salt.returners.cassandra_return.rst │ │ │ ├── salt.returners.mongo_future_return.rst │ │ │ └── index.rst │ ├── clients │ │ └── index.rst │ ├── configuration │ │ └── examples.rst │ └── cli │ │ └── salt-run.rst ├── _templates │ ├── autosummary.rst.tmpl │ ├── 404.html │ └── modules-sidebar.html ├── topics │ ├── tutorials │ │ ├── index.rst │ │ └── cron.rst │ ├── development │ │ └── index.rst │ ├── releases │ │ └── index.rst │ ├── installation │ │ └── gentoo.rst │ ├── master_tops │ │ └── index.rst │ ├── nonroot.rst │ ├── targeting │ │ ├── nodegroups.rst │ │ ├── index.rst │ │ └── batch.rst │ ├── tests │ │ └── index.rst │ └── projects │ │ └── index.rst ├── _incl │ ├── extend_with_require_watch.rst │ └── requisite_incl.rst ├── gen_gource └── _ext │ └── saltdocs.py ├── dev_requirements_python27.txt ├── dev_requirements_python26.txt ├── requirements.txt ├── scripts ├── salt-master ├── salt-run ├── salt-key ├── salt-syndic ├── salt ├── salt-cp ├── salt-call └── salt-minion ├── MANIFEST.in ├── tox.ini ├── LICENSE ├── .gitignore └── .travis.yml /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /salt/grains/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /salt/states/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /salt/tops/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /salt/modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /salt/renderers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /salt/returners/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /salt/runners/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/states/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /pkg/windows/buildenv/var/run/empty.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/integration/client/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/integration/modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/integration/runners/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/integration/shell/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/integration/states/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pkg/windows/buildenv/var/log/salt/minion: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/salt-common.manpages: -------------------------------------------------------------------------------- 1 | doc/man/salt.7 2 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/js/main.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pkg/windows/buildenv/conf/pki/minion/empty.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/grail/empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/salt-syndic.manpages: -------------------------------------------------------------------------------- 1 | doc/man/salt-syndic.1 2 | -------------------------------------------------------------------------------- /pkg/arch/salt-master.service: -------------------------------------------------------------------------------- 1 | ../salt-master.service -------------------------------------------------------------------------------- /pkg/arch/salt-minion.service: -------------------------------------------------------------------------------- 1 | ../salt-minion.service -------------------------------------------------------------------------------- /pkg/arch/salt-syndic.service: -------------------------------------------------------------------------------- 1 | ../salt-syndic.service -------------------------------------------------------------------------------- /pkg/rpm/salt-master.service: -------------------------------------------------------------------------------- 1 | ../salt-master.service -------------------------------------------------------------------------------- /pkg/rpm/salt-minion.service: -------------------------------------------------------------------------------- 1 | ../salt-minion.service -------------------------------------------------------------------------------- /pkg/rpm/salt-syndic.service: -------------------------------------------------------------------------------- 1 | ../salt-syndic.service -------------------------------------------------------------------------------- /pkg/windows/buildenv/var/cache/salt/minion/proc/empty.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/templates/files/test/hello_simple: -------------------------------------------------------------------------------- 1 | world 2 | -------------------------------------------------------------------------------- /tests/integration/files/pillar/base/sub.sls: -------------------------------------------------------------------------------- 1 | sub: sub_minion 2 | -------------------------------------------------------------------------------- /dev_requirements_python27.txt: -------------------------------------------------------------------------------- 1 | -r requirements.txt 2 | 3 | mock 4 | -------------------------------------------------------------------------------- /pkg/windows/buildenv/var/cache/salt/minion/extmods/grains/empty.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /salt/ext/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Salt extension packages. 3 | ''' 4 | -------------------------------------------------------------------------------- /debian/salt-doc.install: -------------------------------------------------------------------------------- 1 | doc/_build/html/* /usr/share/doc/salt/html/ 2 | -------------------------------------------------------------------------------- /debian/salt-minion.manpages: -------------------------------------------------------------------------------- 1 | doc/man/salt-call.1 2 | doc/man/salt-minion.1 3 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/top.sls: -------------------------------------------------------------------------------- 1 | base: 2 | '*': 3 | - core 4 | -------------------------------------------------------------------------------- /tests/unit/templates/files/test/hello_include: -------------------------------------------------------------------------------- 1 | {% include 'hello_import' -%} -------------------------------------------------------------------------------- /dev_requirements_python26.txt: -------------------------------------------------------------------------------- 1 | -r dev_requirements_python27.txt 2 | 3 | unittest2 4 | -------------------------------------------------------------------------------- /tests/integration/files/ext.yaml: -------------------------------------------------------------------------------- 1 | # Test the external pillar interface 2 | ext_spam: eggs 3 | -------------------------------------------------------------------------------- /debian/salt-common.dirs: -------------------------------------------------------------------------------- 1 | /etc/salt/ 2 | /etc/salt/pki/ 3 | /var/cache/salt/ 4 | /var/log/salt/ 5 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = default 3 | stylesheet = css/main.css 4 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/issue-1959-virtualenv-runas/requirements.txt: -------------------------------------------------------------------------------- 1 | pep8==1.3.3 2 | -------------------------------------------------------------------------------- /debian/salt-master.dirs: -------------------------------------------------------------------------------- 1 | /etc/salt/master.d/ 2 | /etc/salt/pki/master/ 3 | /var/cache/salt/master/ 4 | -------------------------------------------------------------------------------- /debian/salt-minion.dirs: -------------------------------------------------------------------------------- 1 | /etc/salt/minion.d/ 2 | /etc/salt/pki/minion/ 3 | /var/cache/salt/minion/ 4 | -------------------------------------------------------------------------------- /doc/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_static/favicon.ico -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Jinja2 2 | M2Crypto 3 | msgpack-python 4 | pycrypto 5 | PyYAML 6 | pyzmq >= 2.1.9 7 | -------------------------------------------------------------------------------- /doc/_static/book_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_static/book_open.png -------------------------------------------------------------------------------- /doc/_static/film_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_static/film_link.png -------------------------------------------------------------------------------- /doc/_static/salt-vert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_static/salt-vert.png -------------------------------------------------------------------------------- /debian/salt-syndic.install: -------------------------------------------------------------------------------- 1 | scripts/salt-syndic /usr/bin 2 | debian/salt-syndic.service /lib/systemd/system 3 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/cheese: -------------------------------------------------------------------------------- 1 | I could just fancy some cheese, Gromit. What do you say? Cheddar? 2 | -------------------------------------------------------------------------------- /doc/_static/saltstack_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_static/saltstack_logo.png -------------------------------------------------------------------------------- /pkg/windows/buildenv/nssm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/pkg/windows/buildenv/nssm.exe -------------------------------------------------------------------------------- /pkg/windows/buildenv/salt.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/pkg/windows/buildenv/salt.ico -------------------------------------------------------------------------------- /pkg/windows/installer/salt.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/pkg/windows/installer/salt.ico -------------------------------------------------------------------------------- /tests/integration/files/file/base/core.sls: -------------------------------------------------------------------------------- 1 | /testfile: 2 | file: 3 | - managed 4 | - source: salt://testfile 5 | -------------------------------------------------------------------------------- /doc/_static/page_white_acrobat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_static/page_white_acrobat.png -------------------------------------------------------------------------------- /tests/integration/files/file/base/issue-2167-exsel-match.sls: -------------------------------------------------------------------------------- 1 | base: 2 | test.ping: 3 | - match: exsel 4 | - test 5 | -------------------------------------------------------------------------------- /debian/salt-master.manpages: -------------------------------------------------------------------------------- 1 | doc/man/salt.1 2 | doc/man/salt-cp.1 3 | doc/man/salt-key.1 4 | doc/man/salt-master.1 5 | doc/man/salt-run.1 6 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/salt-horiz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/salt-horiz.png -------------------------------------------------------------------------------- /salt/modules/rh_ip/conf.jinja: -------------------------------------------------------------------------------- 1 | alias {{name}} bonding 2 | options {{name}} {% for item in bonding %}{{item}}={{bonding[item]}} {%endfor%} 3 | -------------------------------------------------------------------------------- /tests/integration/files/pillar/base/top.sls: -------------------------------------------------------------------------------- 1 | base: 2 | 'minion': 3 | - generic 4 | 'sub_minion': 5 | - generic 6 | - sub 7 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/.DS_Store -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.hg.rst: -------------------------------------------------------------------------------- 1 | ============== 2 | salt.states.hg 3 | ============== 4 | 5 | .. automodule:: salt.states.hg 6 | :members: -------------------------------------------------------------------------------- /doc/ref/wheel/all/salt.wheel.key.rst: -------------------------------------------------------------------------------- 1 | ============== 2 | salt.wheel.key 3 | ============== 4 | 5 | .. automodule:: salt.wheel.key 6 | :members: -------------------------------------------------------------------------------- /debian/salt-common.install: -------------------------------------------------------------------------------- 1 | usr/lib/python2*/dist-packages/salt/ 2 | pkg/salt.ufw /etc/ufw/applications.d/ 3 | pkg/salt.bash /etc/bash_completion.d/ 4 | -------------------------------------------------------------------------------- /doc/_templates/autosummary.rst.tmpl: -------------------------------------------------------------------------------- 1 | {{ underline }} 2 | {{ fullname }} 3 | {{ underline }} 4 | 5 | .. automodule:: {{ fullname }} 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/footerBG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/footerBG.jpg -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/socialFB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/socialFB.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/socialG+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/socialG+.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/socialLI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/socialLI.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/socialTW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/socialTW.png -------------------------------------------------------------------------------- /doc/ref/internals/salt.exceptions.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.exceptions 3 | =============== 4 | 5 | .. automodule:: salt.exceptions 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.at.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.modules.at 3 | =============== 4 | 5 | .. automodule:: salt.modules.at 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.cp.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.modules.cp 3 | =============== 4 | 5 | .. automodule:: salt.modules.cp 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.hg.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.modules.hg 3 | =============== 4 | 5 | .. automodule:: salt.modules.hg 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.ps.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.modules.ps 3 | =============== 4 | 5 | .. automodule:: salt.modules.ps 6 | :members: -------------------------------------------------------------------------------- /doc/ref/output/all/salt.output.key.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.output.key 3 | =============== 4 | 5 | .. automodule:: salt.output.key 6 | :members: -------------------------------------------------------------------------------- /doc/ref/output/all/salt.output.raw.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.output.raw 3 | =============== 4 | 5 | .. automodule:: salt.output.raw 6 | :members: -------------------------------------------------------------------------------- /doc/ref/output/all/salt.output.txt.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.output.txt 3 | =============== 4 | 5 | .. automodule:: salt.output.txt 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.cmd.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.states.cmd 3 | =============== 4 | 5 | .. automodule:: salt.states.cmd 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.gem.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.states.gem 3 | =============== 4 | 5 | .. automodule:: salt.states.gem 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.pip.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.states.pip 3 | =============== 4 | 5 | .. automodule:: salt.states.pip 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.pkg.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.states.pkg 3 | =============== 4 | 5 | .. automodule:: salt.states.pkg 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.rvm.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.states.rvm 3 | =============== 4 | 5 | .. automodule:: salt.states.rvm 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.svn.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.states.svn 3 | =============== 4 | 5 | .. automodule:: salt.states.svn 6 | :members: -------------------------------------------------------------------------------- /tests/unit/templates/files/test/macro: -------------------------------------------------------------------------------- 1 | # macro 2 | {% macro mymacro(greeting, greetee='world') -%} 3 | {{ greeting ~ ' ' ~ greetee }} ! 4 | {%- endmacro %} -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/nexa-light.eot -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/nexa-light.ttf -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/nexa-light.woff -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-xbold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/nexa-xbold.eot -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-xbold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/nexa-xbold.ttf -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-xbold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/nexa-xbold.woff -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/heroImages.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/heroImages.jpg -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/heroScale.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/heroScale.jpg -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/heroSpeed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/heroSpeed.jpg -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/ssWeAreHere.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/ssWeAreHere.jpg -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/theRegister.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/theRegister.jpg -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/img/carouselLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/img/carouselLeft.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/img/carouselRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/img/carouselRight.png -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.apt.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.apt 3 | ================ 4 | 5 | .. automodule:: salt.modules.apt 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.gem.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.gem 3 | ================ 4 | 5 | .. automodule:: salt.modules.gem 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.git.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.git 3 | ================ 4 | 5 | .. automodule:: salt.modules.git 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.pam.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.pam 3 | ================ 4 | 5 | .. automodule:: salt.modules.pam 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.pip.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.pip 3 | ================ 4 | 5 | .. automodule:: salt.modules.pip 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.ret.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.ret 3 | ================ 4 | 5 | .. automodule:: salt.modules.ret 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.rvm.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.rvm 3 | ================ 4 | 5 | .. automodule:: salt.modules.rvm 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.smf.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.smf 3 | ================ 4 | 5 | .. automodule:: salt.modules.smf 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.ssh.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.ssh 3 | ================ 4 | 5 | .. automodule:: salt.modules.ssh 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.svn.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.svn 3 | ================ 4 | 5 | .. automodule:: salt.modules.svn 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.tls.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.tls 3 | ================ 4 | 5 | .. automodule:: salt.modules.tls 6 | :members: -------------------------------------------------------------------------------- /doc/ref/runners/all/salt.runners.doc.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.runners.doc 3 | ================ 4 | 5 | .. automodule:: salt.runners.doc 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.cron.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.states.cron 3 | ================ 4 | 5 | .. automodule:: salt.states.cron 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.file.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.states.file 3 | ================ 4 | 5 | .. automodule:: salt.states.file 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.git.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | salt.states.git 3 | =============== 4 | 5 | .. automodule:: salt.states.git 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.host.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.states.host 3 | ================ 4 | 5 | .. automodule:: salt.states.host 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.kmod.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.states.kmod 3 | ================ 4 | 5 | .. automodule:: salt.states.kmod 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.pecl.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.states.pecl 3 | ================ 4 | 5 | .. automodule:: salt.states.pecl 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.user.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.states.user 3 | ================ 4 | 5 | .. automodule:: salt.states.user 6 | :members: -------------------------------------------------------------------------------- /tests/integration/files/file/base/issue-1879/init.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('issue-1879') }}: 2 | file: 3 | - touch 4 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/heroGetSalted.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/heroGetSalted.jpg -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/socialFB-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/socialFB-dark.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/socialG-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/socialG-dark.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/socialGitHub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/socialGitHub.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/socialLI-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/socialLI-dark.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/socialTW-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/socialTW-dark.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/ssServicesCPS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/ssServicesCPS.jpg -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/img/navCurrentArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/img/navCurrentArrow.png -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.cron.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.modules.cron 3 | ================= 4 | 5 | .. automodule:: salt.modules.cron 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.data.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.modules.data 3 | ================= 4 | 5 | .. automodule:: salt.modules.data 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.disk.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.modules.disk 3 | ================= 4 | 5 | .. automodule:: salt.modules.disk 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.eix.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.eix 3 | ================ 4 | 5 | .. automodule:: salt.modules.eix 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.file.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.modules.file 3 | ================= 4 | 5 | .. automodule:: salt.modules.file 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.kmod.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.modules.kmod 3 | ================= 4 | 5 | .. automodule:: salt.modules.kmod 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.nova.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.modules.nova 3 | ================= 4 | 5 | .. automodule:: salt.modules.nova 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.pecl.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.modules.pecl 3 | ================= 4 | 5 | .. automodule:: salt.modules.pecl 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.reg.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.reg 3 | ================ 4 | 5 | .. automodule:: salt.modules.reg 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.solr.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.modules.solr 3 | ================= 4 | 5 | .. automodule:: salt.modules.solr 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.test.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.modules.test 3 | ================= 4 | 5 | .. automodule:: salt.modules.test 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.virt.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.modules.virt 3 | ================= 4 | 5 | .. automodule:: salt.modules.virt 6 | :members: -------------------------------------------------------------------------------- /doc/ref/runners/all/salt.runners.jobs.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.runners.jobs 3 | ================= 4 | 5 | .. automodule:: salt.runners.jobs 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.group.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.states.group 3 | ================= 4 | 5 | .. automodule:: salt.states.group 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.mount.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.states.mount 3 | ================= 4 | 5 | .. automodule:: salt.states.mount 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.pkgng.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.states.pkgng 3 | ================= 4 | 5 | .. automodule:: salt.states.pkgng 6 | :members: -------------------------------------------------------------------------------- /doc/ref/wheel/all/salt.wheel.config.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.wheel.config 3 | ================= 4 | 5 | .. automodule:: salt.wheel.config 6 | :members: -------------------------------------------------------------------------------- /tests/integration/files/file/base/testappend/init.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('test.append') }}: 2 | file: 3 | - touch 4 | -------------------------------------------------------------------------------- /debian/salt-minion.install: -------------------------------------------------------------------------------- 1 | conf/minion /etc/salt 2 | scripts/salt-minion /usr/bin 3 | scripts/salt-call /usr/bin 4 | debian/salt-minion.service /lib/systemd/system 5 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-light-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/nexa-light-italic.eot -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-light-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/nexa-light-italic.ttf -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-xbold-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/nexa-xbold-italic.eot -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-xbold-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/nexa-xbold-italic.ttf -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/SaltStack-Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/SaltStack-Logo.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/githubTopTenOSS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/githubTopTenOSS.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/heroTakeControl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/heroTakeControl.jpg -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/ssClientProduct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/ssClientProduct.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/ssCloudProduct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/ssCloudProduct.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/ssServerProduct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/ssServerProduct.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/ssSupportProduct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/ssSupportProduct.png -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.bluez.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.bluez 3 | ================== 4 | 5 | .. automodule:: salt.modules.bluez 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.brew.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.modules.brew 3 | ================= 4 | 5 | .. automodule:: salt.modules.brew 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.event.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.event 3 | ================== 4 | 5 | .. automodule:: salt.modules.event 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.extfs.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.extfs 3 | ================== 4 | 5 | .. automodule:: salt.modules.extfs 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.hosts.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.hosts 3 | ================== 4 | 5 | .. automodule:: salt.modules.hosts 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.mdadm.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.mdadm 3 | ================== 4 | 5 | .. automodule:: salt.modules.mdadm 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.monit.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.monit 3 | ================== 4 | 5 | .. automodule:: salt.modules.monit 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.mount.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.mount 3 | ================== 4 | 5 | .. automodule:: salt.modules.mount 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.mysql.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.mysql 3 | ================== 4 | 5 | .. automodule:: salt.modules.mysql 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.nginx.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.nginx 3 | ================== 4 | 5 | .. automodule:: salt.modules.nginx 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.pkgng.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.pkgng 3 | ================== 4 | 5 | .. automodule:: salt.modules.pkgng 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.state.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.state 3 | ================== 4 | 5 | .. automodule:: salt.modules.state 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.zpool.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.zpool 3 | ================== 4 | 5 | .. automodule:: salt.modules.zpool 6 | :members: -------------------------------------------------------------------------------- /doc/ref/output/all/salt.output.grains.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.output.grains 3 | ================== 4 | 5 | .. automodule:: salt.output.grains 6 | :members: -------------------------------------------------------------------------------- /doc/ref/output/all/salt.output.nested.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.output.nested 3 | ================== 4 | 5 | .. automodule:: salt.output.nested 6 | :members: -------------------------------------------------------------------------------- /doc/ref/pillar/all/salt.pillar.hiera.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.pillar.hiera 3 | ================= 4 | 5 | .. automodule:: salt.pillar.hiera 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/pillar/all/salt.pillar.mongo.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.pillar.mongo 3 | ================= 4 | 5 | .. automodule:: salt.pillar.mongo 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/renderers/all/salt.renderers.py.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.renderers.py 3 | ================= 4 | 5 | .. automodule:: salt.renderers.py 6 | :members: -------------------------------------------------------------------------------- /doc/ref/runners/all/salt.runners.cache.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.runners.cache 3 | ================== 4 | 5 | .. automodule:: salt.runners.cache 6 | :members: -------------------------------------------------------------------------------- /doc/ref/runners/all/salt.runners.state.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.runners.state 3 | ================== 4 | 5 | .. automodule:: salt.runners.state 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.alias.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | salt.states.alias 3 | ================= 4 | 5 | .. automodule:: salt.states.alias 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.grains.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.states.grains 3 | ================== 4 | 5 | .. automodule:: salt.states.grains 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.locale.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.states.locale 3 | ================== 4 | 5 | .. automodule:: salt.states.locale 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.module.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.states.module 3 | ================== 4 | 5 | .. automodule:: salt.states.module 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.sysctl.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.states.sysctl 3 | ================== 4 | 5 | .. automodule:: salt.states.sysctl 6 | :members: -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-light-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/nexa-light-italic.woff -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-xbold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/fonts/nexa-xbold-italic.woff -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/cloudOrchestration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/cloudOrchestration.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/heroHeadlineScale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/heroHeadlineScale.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/heroHeadlineSpeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/heroHeadlineSpeed.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/saltStackScale11X.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/saltStackScale11X.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/socialGitHub-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/socialGitHub-dark.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.apache.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.apache 3 | =================== 4 | 5 | .. automodule:: salt.modules.apache 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.config.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.config 3 | =================== 4 | 5 | .. automodule:: salt.modules.config 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.ebuild.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.ebuild 3 | =================== 4 | 5 | .. automodule:: salt.modules.ebuild 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.glance.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.glance 3 | =================== 4 | 5 | .. automodule:: salt.modules.glance 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.grains.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.grains 3 | =================== 4 | 5 | .. automodule:: salt.modules.grains 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.locale.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.locale 3 | =================== 4 | 5 | .. automodule:: salt.modules.locale 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.nzbget.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.nzbget 3 | =================== 4 | 5 | .. automodule:: salt.modules.nzbget 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.pacman.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.pacman 3 | =================== 4 | 5 | .. automodule:: salt.modules.pacman 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.parted.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.parted 3 | =================== 4 | 5 | .. automodule:: salt.modules.parted 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.puppet.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.puppet 3 | =================== 4 | 5 | .. automodule:: salt.modules.puppet 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.rh_ip.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.modules.rh_ip 3 | ================== 4 | 5 | .. automodule:: salt.modules.rh_ip 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.shadow.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.shadow 3 | =================== 4 | 5 | .. automodule:: salt.modules.shadow 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.status.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.status 3 | =================== 4 | 5 | .. automodule:: salt.modules.status 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.sysmod.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.sysmod 3 | =================== 4 | 5 | .. automodule:: salt.modules.sysmod 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.tomcat.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.tomcat 3 | =================== 4 | 5 | .. automodule:: salt.modules.tomcat 6 | :members: -------------------------------------------------------------------------------- /doc/ref/runners/all/salt.runners.manage.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.runners.manage 3 | =================== 4 | 5 | .. automodule:: salt.runners.manage 6 | :members: -------------------------------------------------------------------------------- /doc/ref/runners/all/salt.runners.search.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.runners.search 3 | =================== 4 | 5 | .. automodule:: salt.runners.search 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.layman.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | salt.states.layman 3 | ================== 4 | 5 | .. automodule:: salt.states.layman 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.pkgrepo.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.states.pkgrepo 3 | =================== 4 | 5 | .. automodule:: salt.states.pkgrepo 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.service.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.states.service 3 | =================== 4 | 5 | .. automodule:: salt.states.service 6 | :members: -------------------------------------------------------------------------------- /doc/topics/tutorials/index.rst: -------------------------------------------------------------------------------- 1 | ============== 2 | Salt tutorials 3 | ============== 4 | 5 | .. toctree:: 6 | :maxdepth: 1 7 | :glob: 8 | 9 | * 10 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/cloudOrchestration2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/cloudOrchestration2.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/heroHeadlineControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/heroHeadlineControl.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/heroHeadlineGetSalted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/heroHeadlineGetSalted.png -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.archive.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.archive 3 | ==================== 4 | 5 | .. automodule:: salt.modules.archive 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.cmdmod.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.cmdmod 3 | =================== 4 | 5 | .. automodule:: salt.modules.cmdmod 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.layman.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.layman 3 | =================== 4 | 5 | .. automodule:: salt.modules.layman 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.ldapmod.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.ldapmod 3 | ==================== 4 | 5 | .. automodule:: salt.modules.ldapmod 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.mongodb.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.mongodb 3 | ==================== 4 | 5 | .. automodule:: salt.modules.mongodb 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.moosefs.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.moosefs 3 | ==================== 4 | 5 | .. automodule:: salt.modules.moosefs 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.network.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.network 3 | ==================== 4 | 5 | .. automodule:: salt.modules.network 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.pkgutil.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.pkgutil 3 | ==================== 4 | 5 | .. automodule:: salt.modules.pkgutil 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.publish.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.publish 3 | ==================== 4 | 5 | .. automodule:: salt.modules.publish 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.pw_user.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.pw_user 3 | ==================== 4 | 5 | .. automodule:: salt.modules.pw_user 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.selinux.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.selinux 3 | ==================== 4 | 5 | .. automodule:: salt.modules.selinux 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.service.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.service 3 | ==================== 4 | 5 | .. automodule:: salt.modules.service 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.systemd.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.systemd 3 | ==================== 4 | 5 | .. automodule:: salt.modules.systemd 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.upstart.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.upstart 3 | ==================== 4 | 5 | .. automodule:: salt.modules.upstart 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.useradd.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.useradd 3 | ==================== 4 | 5 | .. automodule:: salt.modules.useradd 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.yumpkg5.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.yumpkg5 3 | ==================== 4 | 5 | .. automodule:: salt.modules.yumpkg5 6 | :members: -------------------------------------------------------------------------------- /doc/ref/output/all/salt.output.json_out.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.output.json_out 3 | ==================== 4 | 5 | .. automodule:: salt.output.json_out 6 | :members: -------------------------------------------------------------------------------- /doc/ref/output/all/salt.output.yaml_out.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.output.yaml_out 3 | ==================== 4 | 5 | .. automodule:: salt.output.yaml_out 6 | :members: -------------------------------------------------------------------------------- /doc/ref/pillar/all/salt.pillar.cmd_json.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.pillar.cmd_json 3 | ==================== 4 | 5 | .. automodule:: salt.pillar.cmd_json 6 | :members: -------------------------------------------------------------------------------- /doc/ref/pillar/all/salt.pillar.puppet.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.pillar.puppet 3 | ==================== 4 | 5 | .. automodule:: salt.pillar.puppet 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/renderers/all/salt.renderers.json.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.renderers.json 3 | =================== 4 | 5 | .. automodule:: salt.renderers.json 6 | :members: -------------------------------------------------------------------------------- /doc/ref/renderers/all/salt.renderers.mako.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.renderers.mako 3 | =================== 4 | 5 | .. automodule:: salt.renderers.mako 6 | :members: -------------------------------------------------------------------------------- /doc/ref/renderers/all/salt.renderers.yaml.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.renderers.yaml 3 | =================== 4 | 5 | .. automodule:: salt.renderers.yaml 6 | :members: -------------------------------------------------------------------------------- /doc/ref/runners/all/salt.runners.launchd.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.runners.launchd 3 | ==================== 4 | 5 | .. automodule:: salt.runners.launchd 6 | :members: -------------------------------------------------------------------------------- /doc/ref/runners/all/salt.runners.network.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.runners.network 3 | ==================== 4 | 5 | .. automodule:: salt.runners.network 6 | :members: -------------------------------------------------------------------------------- /doc/ref/runners/all/salt.runners.winrepo.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.runners.winrepo 3 | ==================== 4 | 5 | .. automodule:: salt.runners.winrepo 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.keyboard.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.states.keyboard 3 | ==================== 4 | 5 | .. automodule:: salt.states.keyboard 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.makeconf.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.states.makeconf 3 | ==================== 4 | 5 | .. automodule:: salt.states.makeconf 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.network.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.states.network 3 | =================== 4 | 5 | .. automodule:: salt.states.network 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.selinux.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.states.selinux 3 | =================== 4 | 5 | .. automodule:: salt.states.selinux 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.ssh_auth.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.states.ssh_auth 3 | ==================== 4 | 5 | .. automodule:: salt.states.ssh_auth 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.timezone.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.states.timezone 3 | ==================== 4 | 5 | .. automodule:: salt.states.timezone 6 | :members: -------------------------------------------------------------------------------- /doc/ref/tops/all/salt.tops.ext_nodes.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.tops.ext_nodes 3 | =================== 4 | 5 | .. automodule:: salt.tops.ext_nodes 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.aliases.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.aliases 3 | ==================== 4 | 5 | .. automodule:: salt.modules.aliases 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.groupadd.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.groupadd 3 | ===================== 4 | 5 | .. automodule:: salt.modules.groupadd 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.iptables.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.iptables 3 | ===================== 4 | 5 | .. automodule:: salt.modules.iptables 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.keyboard.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.keyboard 3 | ===================== 4 | 5 | .. automodule:: salt.modules.keyboard 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.keystone.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.keystone 3 | ===================== 4 | 5 | .. automodule:: salt.modules.keystone 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.pw_group.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.pw_group 3 | ===================== 4 | 5 | .. automodule:: salt.modules.pw_group 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.rabbitmq.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.rabbitmq 3 | ===================== 4 | 5 | .. automodule:: salt.modules.rabbitmq 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.saltutil.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.saltutil 3 | ===================== 4 | 5 | .. automodule:: salt.modules.saltutil 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.sqlite3.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.sqlite3 3 | ==================== 4 | 5 | .. automodule:: salt.modules.sqlite3 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.sysbench.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.sysbench 3 | ===================== 4 | 5 | .. automodule:: salt.modules.sysbench 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.timezone.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.timezone 3 | ===================== 4 | 5 | .. automodule:: salt.modules.timezone 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.win_disk.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.win_disk 3 | ===================== 4 | 5 | .. automodule:: salt.modules.win_disk 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.win_file.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.win_file 3 | ===================== 4 | 5 | .. automodule:: salt.modules.win_file 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.win_pkg.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.modules.win_pkg 3 | ==================== 4 | 5 | .. automodule:: salt.modules.win_pkg 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/output/all/salt.output.highstate.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.output.highstate 3 | ===================== 4 | 5 | .. automodule:: salt.output.highstate 6 | :members: -------------------------------------------------------------------------------- /doc/ref/pillar/all/salt.pillar.cmd_yaml.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.pillar.cmd_yaml 3 | ==================== 4 | 5 | .. automodule:: salt.pillar.cmd_yaml 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/renderers/all/salt.renderers.pydsl.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.renderers.pydsl 3 | ==================== 4 | 5 | .. automodule:: salt.renderers.pydsl 6 | :members: -------------------------------------------------------------------------------- /doc/ref/renderers/all/salt.renderers.wempy.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.renderers.wempy 3 | ==================== 4 | 5 | .. automodule:: salt.renderers.wempy 6 | :members: -------------------------------------------------------------------------------- /doc/ref/returners/all/salt.returners.local.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.returners.local 3 | ==================== 4 | 5 | .. automodule:: salt.returners.local 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.stateconf.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.states.stateconf 3 | ===================== 4 | 5 | .. automodule:: salt.states.stateconf 6 | :members: -------------------------------------------------------------------------------- /doc/ref/wheel/all/salt.wheel.file_roots.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.wheel.file_roots 3 | ===================== 4 | 5 | .. automodule:: salt.wheel.file_roots 6 | :members: -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/aboutSaltStackLogoGraphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/aboutSaltStackLogoGraphic.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/blackDuckRookieoftheYear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/blackDuckRookieoftheYear.png -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/ssServicesOnsiteTraining.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/ssServicesOnsiteTraining.jpg -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/images/ssServicesRegionalTraining.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zacharyvoase/salt/develop/doc/_themes/saltstack/static/images/ssServicesRegionalTraining.jpg -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.butterkvm.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | salt.modules.butterkvm 3 | ====================== 4 | 5 | .. automodule:: salt.modules.butterkvm 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.cassandra.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | salt.modules.cassandra 3 | ====================== 4 | 5 | .. automodule:: salt.modules.cassandra 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.djangomod.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | salt.modules.djangomod 3 | ====================== 4 | 5 | .. automodule:: salt.modules.djangomod 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.linux_acl.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | salt.modules.linux_acl 3 | ====================== 4 | 5 | .. automodule:: salt.modules.linux_acl 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.linux_lvm.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | salt.modules.linux_lvm 3 | ====================== 4 | 5 | .. automodule:: salt.modules.linux_lvm 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.makeconf.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.makeconf 3 | ===================== 4 | 5 | .. automodule:: salt.modules.makeconf 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.postgres.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | salt.modules.postgres 3 | ===================== 4 | 5 | .. automodule:: salt.modules.postgres 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.poudriere.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | salt.modules.poudriere 3 | ====================== 4 | 5 | .. automodule:: salt.modules.poudriere 6 | :members: -------------------------------------------------------------------------------- /doc/ref/output/all/salt.output.pprint_out.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | salt.output.pprint_out 3 | ====================== 4 | 5 | .. automodule:: salt.output.pprint_out 6 | :members: -------------------------------------------------------------------------------- /doc/ref/returners/all/salt.returners.mysql.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | salt.returners.mysql 3 | ==================== 4 | 5 | .. automodule:: salt.returners.mysql 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.debconfmod.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | salt.states.debconfmod 3 | ====================== 4 | 5 | .. automodule:: salt.states.debconfmod 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.mysql_user.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | salt.states.mysql_user 3 | ====================== 4 | 5 | .. automodule:: salt.states.mysql_user 6 | :members: -------------------------------------------------------------------------------- /tests/integration/files/file/base/fuzz/multi_state.sls: -------------------------------------------------------------------------------- 1 | /etc/foobar: 2 | file.recurse: 3 | - source: salt://fuzz/ 4 | file.managed: 5 | - source: salt://fuzz/multi_state.sls 6 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.augeas_cfg.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.modules.augeas_cfg 3 | ======================= 4 | 5 | .. automodule:: salt.modules.augeas_cfg 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.debconfmod.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.modules.debconfmod 3 | ======================= 4 | 5 | .. automodule:: salt.modules.debconfmod 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.freebsdpkg.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.modules.freebsdpkg 3 | ======================= 4 | 5 | .. automodule:: salt.modules.freebsdpkg 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.kvm_hyper.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | salt.modules.kvm_hyper 3 | ====================== 4 | 5 | .. automodule:: salt.modules.kvm_hyper 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.launchctl.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | salt.modules.launchctl 3 | ====================== 4 | 5 | .. automodule:: salt.modules.launchctl 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.openbsdpkg.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.modules.openbsdpkg 3 | ======================= 4 | 5 | .. automodule:: salt.modules.openbsdpkg 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.rh_service.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.modules.rh_service 3 | ======================= 4 | 5 | .. automodule:: salt.modules.rh_service 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.solarispkg.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.modules.solarispkg 3 | ======================= 4 | 5 | .. automodule:: salt.modules.solarispkg 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.virtualenv.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.modules.virtualenv 3 | ======================= 4 | 5 | .. automodule:: salt.modules.virtualenv 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.win_shadow.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.modules.win_shadow 3 | ======================= 4 | 5 | .. automodule:: salt.modules.win_shadow 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.win_status.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.modules.win_status 3 | ======================= 4 | 5 | .. automodule:: salt.modules.win_status 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.supervisord.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.states.supervisord 3 | ======================= 4 | 5 | .. automodule:: salt.states.supervisord 6 | :members: -------------------------------------------------------------------------------- /doc/ref/wheel/all/salt.wheel.pillar_roots.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.wheel.pillar_roots 3 | ======================= 4 | 5 | .. automodule:: salt.wheel.pillar_roots 6 | :members: -------------------------------------------------------------------------------- /tests/unit/templates/files/test/hello_import: -------------------------------------------------------------------------------- 1 | {% from 'macro' import mymacro -%} 2 | {% from 'macro' import mymacro -%} 3 | {{ mymacro('Hey') ~ mymacro(a|default('a'), b|default('b')) }} 4 | -------------------------------------------------------------------------------- /debian/salt-common.lintian-overrides: -------------------------------------------------------------------------------- 1 | salt-common: manpage-has-errors-from-man usr/share/man/man7/salt.7.gz 2 | # The man page renders correctly, no need for lintian to get upset about 3 | # it. 4 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.daemontools.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | salt.modules.daemontools 3 | ======================== 4 | 5 | .. automodule:: salt.modules.daemontools 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.freebsdkmod.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | salt.modules.freebsdkmod 3 | ======================== 4 | 5 | .. automodule:: salt.modules.freebsdkmod 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.grub_legacy.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | salt.modules.grub_legacy 3 | ======================== 4 | 5 | .. automodule:: salt.modules.grub_legacy 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.osxdesktop.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.modules.osxdesktop 3 | ======================= 4 | 5 | .. automodule:: salt.modules.osxdesktop 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.supervisord.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | salt.modules.supervisord 3 | ======================== 4 | 5 | .. automodule:: salt.modules.supervisord 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.win_network.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | salt.modules.win_network 3 | ======================== 4 | 5 | .. automodule:: salt.modules.win_network 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.win_service.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | salt.modules.win_service 3 | ======================== 4 | 5 | .. automodule:: salt.modules.win_service 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.win_useradd.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | salt.modules.win_useradd 3 | ======================== 4 | 5 | .. automodule:: salt.modules.win_useradd 6 | :members: -------------------------------------------------------------------------------- /doc/ref/pillar/all/salt.pillar.pillar_ldap.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.pillar.pillar_ldap 3 | ======================= 4 | 5 | .. automodule:: salt.pillar.pillar_ldap 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/returners/all/salt.returners.postgres.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | salt.returners.postgres 3 | ======================= 4 | 5 | .. automodule:: salt.returners.postgres 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.alternatives.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | salt.states.alternatives 3 | ======================== 4 | 5 | .. automodule:: salt.states.alternatives 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.mongodb_user.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | salt.states.mongodb_user 3 | ======================== 4 | 5 | .. automodule:: salt.states.mongodb_user 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.mysql_grants.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | salt.states.mysql_grants 3 | ======================== 4 | 5 | .. automodule:: salt.states.mysql_grants 6 | :members: -------------------------------------------------------------------------------- /tests/integration/files/file/base/hello.patch: -------------------------------------------------------------------------------- 1 | --- a/src.txt 2012-10-17 13:11:08.000000000 -0400 2 | +++ b/src.txt 2012-10-17 13:11:37.000000000 -0400 3 | @@ -1 +1 @@ 4 | -Hello 5 | +Hello world 6 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/testappend/step-2.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('test.append') }}: 2 | file.append: 3 | - source: salt://testappend/secondif 4 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/to-include-test.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('to-include-test') }}: 2 | file: 3 | - managed 4 | - source: salt://testfile 5 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.alternatives.rst: -------------------------------------------------------------------------------- 1 | ========================= 2 | salt.modules.alternatives 3 | ========================= 4 | 5 | .. automodule:: salt.modules.alternatives 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.freebsdjail.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | salt.modules.freebsdjail 3 | ======================== 4 | 5 | .. automodule:: salt.modules.freebsdjail 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.linux_sysctl.rst: -------------------------------------------------------------------------------- 1 | ========================= 2 | salt.modules.linux_sysctl 3 | ========================= 4 | 5 | .. automodule:: salt.modules.linux_sysctl 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.pkg_resource.rst: -------------------------------------------------------------------------------- 1 | ========================= 2 | salt.modules.pkg_resource 3 | ========================= 4 | 5 | .. automodule:: salt.modules.pkg_resource 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.solaris_user.rst: -------------------------------------------------------------------------------- 1 | ========================= 2 | salt.modules.solaris_user 3 | ========================= 4 | 5 | .. automodule:: salt.modules.solaris_user 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.postgres_user.rst: -------------------------------------------------------------------------------- 1 | ========================= 2 | salt.states.postgres_user 3 | ========================= 4 | 5 | .. automodule:: salt.states.postgres_user 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.rabbitmq_user.rst: -------------------------------------------------------------------------------- 1 | ========================= 2 | salt.states.rabbitmq_user 3 | ========================= 4 | 5 | .. automodule:: salt.states.rabbitmq_user 6 | :members: -------------------------------------------------------------------------------- /tests/integration/files/file/base/hello_dolly.patch: -------------------------------------------------------------------------------- 1 | --- a/src.txt 2012-10-17 13:11:08.000000000 -0400 2 | +++ b/src.txt 2012-10-17 13:11:37.000000000 -0400 3 | @@ -1 +1 @@ 4 | -Hello 5 | +Hello Dolly 6 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/testappend/step-1.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('test.append') }}: 2 | 3 | file.append: 4 | - source: salt://testappend/firstif 5 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.solaris_group.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | salt.modules.solaris_group 3 | ========================== 4 | 5 | .. automodule:: salt.modules.solaris_group 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.win_groupadd.rst: -------------------------------------------------------------------------------- 1 | ========================= 2 | salt.modules.win_groupadd 3 | ========================= 4 | 5 | .. automodule:: salt.modules.win_groupadd 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/output/all/salt.output.overstatestage.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | salt.output.overstatestage 3 | ========================== 4 | 5 | .. automodule:: salt.output.overstatestage 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.mysql_database.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | salt.states.mysql_database 3 | ========================== 4 | 5 | .. automodule:: salt.states.mysql_database 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.rabbitmq_vhost.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | salt.states.rabbitmq_vhost 3 | ========================== 4 | 5 | .. automodule:: salt.states.rabbitmq_vhost 6 | :members: -------------------------------------------------------------------------------- /scripts/salt-master: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | Start the salt-master 4 | ''' 5 | 6 | from salt.scripts import salt_master 7 | 8 | 9 | if __name__ == '__main__': 10 | salt_master() 11 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/testappend/secondif: -------------------------------------------------------------------------------- 1 | # enable bash completion in interactive shells 2 | if [ -f /etc/bash_completion ] && ! shopt -oq posix; then 3 | . /etc/bash_completion 4 | fi 5 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.debian_service.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | salt.modules.debian_service 3 | =========================== 4 | 5 | .. automodule:: salt.modules.debian_service 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.freebsd_sysctl.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | salt.modules.freebsd_sysctl 3 | =========================== 4 | 5 | .. automodule:: salt.modules.freebsd_sysctl 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.freebsdservice.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | salt.modules.freebsdservice 3 | =========================== 4 | 5 | .. automodule:: salt.modules.freebsdservice 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.gentoo_service.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | salt.modules.gentoo_service 3 | =========================== 4 | 5 | .. automodule:: salt.modules.gentoo_service 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.gentoolkitmod.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | salt.modules.gentoolkitmod 3 | ========================== 4 | 5 | .. automodule:: salt.modules.gentoolkitmod 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.openbsdservice.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | salt.modules.openbsdservice 3 | =========================== 4 | 5 | .. automodule:: salt.modules.openbsdservice 6 | :members: -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.pillar.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.pillar 3 | =================== 4 | 5 | .. automodule:: salt.modules.pillar 6 | :members: 7 | :exclude-members: items 8 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.solaris_shadow.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | salt.modules.solaris_shadow 3 | =========================== 4 | 5 | .. automodule:: salt.modules.solaris_shadow 6 | :members: -------------------------------------------------------------------------------- /doc/ref/returners/all/salt.returners.smtp_return.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | salt.returners.smtp_return 3 | ========================== 4 | 5 | .. automodule:: salt.returners.smtp_return 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.postgres_group.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | salt.states.postgres_group 3 | ========================== 4 | 5 | .. automodule:: salt.states.postgres_group 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/topics/development/index.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | Salt Development Guidelines 3 | =========================== 4 | 5 | .. toctree:: 6 | :maxdepth: 1 7 | :glob: 8 | 9 | * 10 | -------------------------------------------------------------------------------- /pkg/salt-syndic.upstart: -------------------------------------------------------------------------------- 1 | description "salt-syndic" 2 | 3 | start on (net-device-up 4 | and local-filesystems 5 | and runlevel [2345]) 6 | stop on runlevel [!2345] 7 | 8 | exec salt-syndic 9 | -------------------------------------------------------------------------------- /scripts/salt-run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | Execute a salt convenience routine 4 | ''' 5 | 6 | from salt.scripts import salt_run 7 | 8 | 9 | if __name__ == '__main__': 10 | salt_run() 11 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.zypper.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.zypper 3 | =================== 4 | 5 | .. automodule:: salt.modules.zypper 6 | :members: 7 | :exclude-members: list_updates 8 | -------------------------------------------------------------------------------- /doc/ref/returners/all/salt.returners.redis_return.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | salt.returners.redis_return 3 | =========================== 4 | 5 | .. automodule:: salt.returners.redis_return 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.mongodb_database.rst: -------------------------------------------------------------------------------- 1 | ============================ 2 | salt.states.mongodb_database 3 | ============================ 4 | 5 | .. automodule:: salt.states.mongodb_database 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.ssh_known_hosts.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | salt.states.ssh_known_hosts 3 | =========================== 4 | 5 | .. automodule:: salt.states.ssh_known_hosts 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/returners/all/salt.returners.mongo_return.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | salt.returners.mongo_return 3 | =========================== 4 | 5 | .. automodule:: salt.returners.mongo_return 6 | :members: 7 | -------------------------------------------------------------------------------- /doc/ref/returners/all/salt.returners.syslog_return.rst: -------------------------------------------------------------------------------- 1 | ============================ 2 | salt.returners.syslog_return 3 | ============================ 4 | 5 | .. automodule:: salt.returners.syslog_return 6 | :members: -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.postgres_database.rst: -------------------------------------------------------------------------------- 1 | ============================= 2 | salt.states.postgres_database 3 | ============================= 4 | 5 | .. automodule:: salt.states.postgres_database 6 | :members: -------------------------------------------------------------------------------- /scripts/salt-key: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | Manage the authentication keys with salt-key 4 | ''' 5 | 6 | from salt.scripts import salt_key 7 | 8 | 9 | if __name__ == '__main__': 10 | salt_key() 11 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/testappend/issue-2227.sls: -------------------------------------------------------------------------------- 1 | issue-2227: 2 | file.append: 3 | - name: {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('test.append') }} 4 | - text: HISTTIMEFORMAT='%F %T ' 5 | -------------------------------------------------------------------------------- /doc/ref/states/all/salt.states.virtualenv.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | salt.states.virtualenv 3 | ====================== 4 | 5 | .. automodule:: salt.states.virtualenv 6 | :members: 7 | :exclude-members: manage 8 | -------------------------------------------------------------------------------- /doc/ref/returners/all/salt.returners.cassandra_return.rst: -------------------------------------------------------------------------------- 1 | =============================== 2 | salt.returners.cassandra_return 3 | =============================== 4 | 5 | .. automodule:: salt.returners.cassandra_return 6 | :members: -------------------------------------------------------------------------------- /pkg/salt-minion.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=The Salt Minion 3 | After=syslog.target network.target 4 | 5 | [Service] 6 | Type=simple 7 | ExecStart=/usr/bin/salt-minion 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | -------------------------------------------------------------------------------- /scripts/salt-syndic: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | This script is used to kick off a salt syndic daemon 4 | ''' 5 | 6 | from salt.scripts import salt_syndic 7 | 8 | 9 | if __name__ == '__main__': 10 | salt_syndic() 11 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/include-test.sls: -------------------------------------------------------------------------------- 1 | include: 2 | - to-include-test 3 | 4 | {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('include-test') }}: 5 | file: 6 | - managed 7 | - source: salt://testfile 8 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/issue-1876.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('issue-1876') }}: 2 | file: 3 | - managed 4 | - source: salt://testfile 5 | 6 | file.append: 7 | - text: foo 8 | 9 | -------------------------------------------------------------------------------- /pkg/salt-master.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=The Salt Master Server 3 | After=syslog.target network.target 4 | 5 | [Service] 6 | Type=simple 7 | ExecStart=/usr/bin/salt-master 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | -------------------------------------------------------------------------------- /pkg/salt-syndic.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=The Salt Master Server 3 | After=syslog.target network.target 4 | 5 | [Service] 6 | Type=simple 7 | ExecStart=/usr/bin/salt-syndic 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | -------------------------------------------------------------------------------- /doc/topics/releases/index.rst: -------------------------------------------------------------------------------- 1 | ====================================== 2 | Release notes and upgrade instructions 3 | ====================================== 4 | 5 | .. releasestree:: 6 | :maxdepth: 1 7 | :glob: 8 | 9 | * 10 | -------------------------------------------------------------------------------- /scripts/salt: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | Publish commands to the salt system from the command line on the master. 4 | ''' 5 | 6 | from salt.scripts import salt_main 7 | 8 | 9 | if __name__ == '__main__': 10 | salt_main() 11 | -------------------------------------------------------------------------------- /scripts/salt-cp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | Publish commands to the salt system from the command line on the master. 4 | ''' 5 | 6 | from salt.scripts import salt_cp 7 | 8 | 9 | if __name__ == '__main__': 10 | salt_cp() 11 | -------------------------------------------------------------------------------- /debian/salt-master.install: -------------------------------------------------------------------------------- 1 | conf/master /etc/salt 2 | scripts/salt-master /usr/bin 3 | scripts/salt-cp /usr/bin 4 | scripts/salt-run /usr/bin 5 | scripts/salt-key /usr/bin 6 | scripts/salt /usr/bin 7 | debian/salt-master.service /lib/systemd/system 8 | -------------------------------------------------------------------------------- /doc/_incl/extend_with_require_watch.rst: -------------------------------------------------------------------------------- 1 | .. admonition:: Using extend with require or watch 2 | 3 | The ``extend`` statement works differently for ``require`` or ``watch``. 4 | It appends to, rather than replacing the requisite component. 5 | -------------------------------------------------------------------------------- /doc/ref/returners/all/salt.returners.mongo_future_return.rst: -------------------------------------------------------------------------------- 1 | ================================== 2 | salt.returners.mongo_future_return 3 | ================================== 4 | 5 | .. automodule:: salt.returners.mongo_future_return 6 | :members: -------------------------------------------------------------------------------- /pkg/salt-master.upstart: -------------------------------------------------------------------------------- 1 | description "Salt Master" 2 | 3 | start on (net-device-up 4 | and local-filesystems 5 | and runlevel [2345]) 6 | stop on runlevel [!2345] 7 | 8 | script 9 | exec salt-master 10 | end script 11 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/testappend/firstif: -------------------------------------------------------------------------------- 1 | # set variable identifying the chroot you work in (used in the prompt below) 2 | if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then 3 | debian_chroot=$(cat /etc/debian_chroot) 4 | fi 5 | 6 | -------------------------------------------------------------------------------- /doc/ref/internals/index.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | Salt code and internals 3 | ======================= 4 | 5 | Reference documentation on Salt's internal code. 6 | 7 | Contents 8 | ======== 9 | 10 | .. toctree:: 11 | :glob: 12 | 13 | * 14 | -------------------------------------------------------------------------------- /tests/unit/simple.py: -------------------------------------------------------------------------------- 1 | from saltunittest import TestCase, expectedFailure 2 | 3 | 4 | class SimpleTest(TestCase): 5 | def test_success(self): 6 | assert True 7 | 8 | @expectedFailure 9 | def test_fail(self): 10 | assert False 11 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/issue-2087-missing-pip.sls: -------------------------------------------------------------------------------- 1 | pep8-pip: 2 | pip.installed: 3 | - name: pep8 4 | - mirrors: http://testpypi.python.org/pypi 5 | - bin_env: {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('issue-2087-missing-pip') }} 6 | -------------------------------------------------------------------------------- /salt/output/no_out.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Display no output. 3 | ''' 4 | 5 | def __virtual__(): 6 | return 'quiet' 7 | 8 | def output(ret): 9 | ''' 10 | Don't display data. Used when you only are interested in the 11 | return. 12 | ''' 13 | return '' 14 | -------------------------------------------------------------------------------- /scripts/salt-call: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | Directly call a salt command in the modules, does not require a running salt 4 | minion to run. 5 | ''' 6 | 7 | from salt.scripts import salt_call 8 | 9 | 10 | if __name__ == '__main__': 11 | salt_call() 12 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/exclude-test.sls: -------------------------------------------------------------------------------- 1 | exclude: 2 | - to-include-test 3 | 4 | include: 5 | - include-test 6 | 7 | {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('exclude-test') }}: 8 | file: 9 | - managed 10 | - source: salt://testfile 11 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/pip-installed-errors.sls: -------------------------------------------------------------------------------- 1 | supervisord-pip: 2 | pip.installed: 3 | - name: supervisor 4 | - mirrors: http://testpypi.python.org/pypi 5 | - bin_env: {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('pip-installed-errors') }} 6 | -------------------------------------------------------------------------------- /pkg/salt-minion.upstart: -------------------------------------------------------------------------------- 1 | description "Salt Minion" 2 | 3 | start on (net-device-up 4 | and local-filesystems 5 | and runlevel [2345]) 6 | stop on runlevel [!2345] 7 | 8 | respawn 9 | respawn limit 10 5 10 | 11 | script 12 | exec salt-minion 13 | end script 14 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/issue-1959-virtualenv-runas/init.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('issue-1959-virtualenv-runas') }}: 2 | virtualenv.manage: 3 | - requirements: salt://issue-1959-virtualenv-runas/requirements.txt 4 | - runas: issue-1959 5 | -------------------------------------------------------------------------------- /pkg/salt.ufw: -------------------------------------------------------------------------------- 1 | # Install into /etc/ufw/applications.d/ and run 'ufw app update' to add salt 2 | # firewall rules to systems with UFW. Activate with 'ufw allow salt' 3 | [Salt] 4 | title=salt 5 | description=fast and powerful configuration management and remote execution 6 | ports=4505,4506/tcp 7 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/recurse_fail.sls: -------------------------------------------------------------------------------- 1 | mysql: 2 | service: 3 | - running 4 | - require: 5 | - file: /etc/mysql/my.cnf 6 | 7 | /etc/mysql/my.cnf: 8 | file: 9 | - managed 10 | - source: salt://master.cnf 11 | - require: 12 | - service: mysql 13 | 14 | -------------------------------------------------------------------------------- /tests/integration/files/conf/syndic_master: -------------------------------------------------------------------------------- 1 | publish_port: 54505 2 | ret_port: 54506 3 | worker_threads: 3 4 | root_dir: /tmp/saltsyndictest 5 | pidfile: syndicmasterpid 6 | pki_dir: pki 7 | cachedir: cache 8 | timeout: 1 9 | sock_dir: .salt-unix-syndic 10 | open_mode: True 11 | order_masters: True 12 | -------------------------------------------------------------------------------- /tests/integration/mockbin/su: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # "Fake" su command 3 | # 4 | # Just executes the command without changing effective uid. Used in integration 5 | # tests. 6 | while true; do 7 | shift 8 | test "x$1" == "x-c" && break 9 | test "x$1" == "x" && break 10 | done 11 | shift 12 | exec /bin/bash -c "$@" 13 | -------------------------------------------------------------------------------- /doc/ref/tops/all/index.rst: -------------------------------------------------------------------------------- 1 | .. _all-salt.tops: 2 | 3 | ======================================== 4 | Full list of builtin master tops modules 5 | ======================================== 6 | 7 | .. currentmodule:: salt.tops 8 | 9 | .. autosummary:: 10 | :toctree: 11 | :template: autosummary.rst.tmpl 12 | 13 | ext_nodes 14 | -------------------------------------------------------------------------------- /doc/ref/tops/index.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _salt-top: 3 | 4 | =========== 5 | Master Tops 6 | =========== 7 | 8 | Salt includes a number of built-in subsystems to generate top file data, they 9 | are listed listed at 10 | :ref:`all-salt.tops`. 11 | 12 | The source for the built-in Salt master tops can be found here: 13 | :blob:`salt/tops` 14 | -------------------------------------------------------------------------------- /salt/output/raw.py: -------------------------------------------------------------------------------- 1 | ''' 2 | The raw outputter outputs the data via the python print function and is shown 3 | in a raw state. This was the original outputter used by Salt before the 4 | outputter system was developed. 5 | ''' 6 | 7 | 8 | def output(data): 9 | ''' 10 | Rather basic.... 11 | ''' 12 | return str(data) 13 | -------------------------------------------------------------------------------- /salt/returners/local.py: -------------------------------------------------------------------------------- 1 | ''' 2 | The local returner is used to test the returner interface, it just prints the 3 | return data to the console to verify that it is being passed properly 4 | ''' 5 | 6 | 7 | def returner(ret): 8 | ''' 9 | Print the return data to the terminal to verify functionality 10 | ''' 11 | print(ret) 12 | -------------------------------------------------------------------------------- /tests/integration/files/conf/syndic: -------------------------------------------------------------------------------- 1 | # basic config 2 | master: localhost 3 | master_port: 54506 4 | root_dir: /tmp/salttest 5 | sock_dir: .salt-unix 6 | pki_dir: pki 7 | id: minion 8 | cachedir: cache 9 | acceptance_wait_time: 1 10 | open_mode: True 11 | log_file: minion 12 | order_masters: True 13 | interface: 0.0.0.0 14 | ret_port: 64506 15 | -------------------------------------------------------------------------------- /salt/modules/rh_ip/network.jinja: -------------------------------------------------------------------------------- 1 | {% if networking %}NETWORKING={{networking}} 2 | {%endif%}{% if hostname %}HOSTNAME={{hostname}} 3 | {%endif%}{% if gateway %}GATEWAY={{gateway}} 4 | {%endif%}{% if gatewaydev %}GATEWAYDEV={{gatewaydev}} 5 | {%endif%}{% if nisdomain %}NISDOMAIN={{nisdomain}} 6 | {%endif%}{% if nozeroconf %}NOZEROCONF={{nozeroconf}}{%endif%} 7 | -------------------------------------------------------------------------------- /pkg/salt-common.logrotate: -------------------------------------------------------------------------------- 1 | /var/log/salt/master { 2 | weekly 3 | missingok 4 | rotate 7 5 | compress 6 | notifempty 7 | } 8 | 9 | /var/log/salt/minion { 10 | weekly 11 | missingok 12 | rotate 7 13 | compress 14 | notifempty 15 | } 16 | 17 | /var/log/salt/key { 18 | weekly 19 | missingok 20 | rotate 7 21 | compress 22 | notifempty 23 | } 24 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/issue-1879/step-2.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('issue-1879') }}: 2 | file.append: 3 | - text: | 4 | # enable bash completion in interactive shells 5 | if [ -f /etc/bash_completion ] && ! shopt -oq posix; then 6 | . /etc/bash_completion 7 | fi 8 | 9 | -------------------------------------------------------------------------------- /doc/ref/clients/index.rst: -------------------------------------------------------------------------------- 1 | .. _client-apis: 2 | 3 | ========================== 4 | Salt client API interfaces 5 | ========================== 6 | 7 | .. autoclass:: salt.client.LocalClient 8 | :members: cmd 9 | 10 | .. autoclass:: salt.runner.RunnerClient 11 | :members: low 12 | 13 | .. autoclass:: salt.wheel.Wheel 14 | :members: master_call 15 | -------------------------------------------------------------------------------- /salt/runners/fileserver.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Directly manage the salt fileserver plugins 3 | ''' 4 | 5 | # Import salt libs 6 | import salt.fileserver 7 | 8 | 9 | def update(): 10 | ''' 11 | Execute an update for all of the configured fileserver backends 12 | ''' 13 | fileserver = salt.fileserver.Fileserver(__opts__) 14 | fileserver.update() 15 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/recurse_ok_two.sls: -------------------------------------------------------------------------------- 1 | nagios-nrpe-server: 2 | pkg: 3 | - installed 4 | service: 5 | - running 6 | - watch: 7 | - file: /etc/nagios/nrpe.cfg 8 | 9 | /etc/nagios/nrpe.cfg: 10 | file: 11 | - managed 12 | - source: salt://baseserver/nrpe.cfg 13 | - require: 14 | - pkg: nagios-nrpe-server 15 | 16 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | PKGFILES = pkg/*.service pkg/*.upstart pkg/*.logrotate 4 | SALT_BIN = common minion master syndic 5 | 6 | %: 7 | make -C doc html 8 | cp $(PKGFILES) debian 9 | for d in $(SALT_BIN); do \ 10 | cp pkg/salt.postrm debian/salt-$${d}.postrm; done 11 | dh $@ 12 | 13 | dh_override_auto_build: 14 | python setup.py build 15 | -------------------------------------------------------------------------------- /salt/grains/opts.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Simple grain to merge the opts into the grains directly if the grain_opts 3 | configuration value is set 4 | ''' 5 | 6 | def opts(): 7 | ''' 8 | Return the minion configuration settings 9 | ''' 10 | if __opts__.get('grain_opts', False) or __pillar__.get('grain_opts', False): 11 | return __opts__ 12 | return {} 13 | -------------------------------------------------------------------------------- /doc/ref/wheel/all/index.rst: -------------------------------------------------------------------------------- 1 | .. _all-salt.wheel: 2 | 3 | ================================== 4 | Full list of builtin wheel modules 5 | ================================== 6 | 7 | .. currentmodule:: salt.wheel 8 | 9 | .. autosummary:: 10 | :toctree: 11 | :template: autosummary.rst.tmpl 12 | 13 | config 14 | file_roots 15 | key 16 | pillar_roots 17 | -------------------------------------------------------------------------------- /debian/salt-doc.doc-base: -------------------------------------------------------------------------------- 1 | Document: salt-doc 2 | Title: Welcome to Salt! 3 | Author: Thomas S. Hatch 4 | Abstract: This documention provides details about Salt. 5 | Salt is a remote execution and configuration management tool. 6 | Section: System/Administration 7 | 8 | Format: HTML 9 | Index: /usr/share/doc/salt/html/index.html 10 | Files: /usr/share/doc/salt/html/*/*.html 11 | -------------------------------------------------------------------------------- /pkg/freeze/freeze.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from bbfreeze import Freezer 4 | 5 | includes = ['zmq', 'zmq.utils.strtypes', 'zmq.utils.jsonapi'] 6 | excludes = ['Tkinter', 'tcl', 'Tkconstants'] 7 | 8 | fre = Freezer(distdir="bb_salt", includes=includes, excludes=excludes) 9 | fre.addScript('/usr/bin/salt-minion') 10 | fre.use_compression = 0 11 | fre.include_py = True 12 | fre() 13 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.yumpkg.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | salt.modules.yumpkg 3 | =================== 4 | 5 | .. versionadded:: 0.9.4 6 | This module replaces the "yum" module in previous releases. It is backward 7 | compatible and uses the native yum Python interface instead of the CLI 8 | interface. 9 | 10 | .. automodule:: salt.modules.yumpkg 11 | :members: 12 | -------------------------------------------------------------------------------- /tests/integration/files/ssh/raw: -------------------------------------------------------------------------------- 1 | AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== 2 | -------------------------------------------------------------------------------- /doc/ref/pillar/index.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _salt-pillars: 3 | 4 | ======= 5 | Pillars 6 | ======= 7 | 8 | Salt includes a number of built-in external pillars, listed at 9 | :ref:`all-salt.pillars`. 10 | 11 | You may also wish to look at the standard pillar documentation, at 12 | :ref:`pillar-configuration` 13 | 14 | The source for the built-in Salt pillars can be found here: 15 | :blob:`salt/pillar` 16 | -------------------------------------------------------------------------------- /tests/integration/files/hosts: -------------------------------------------------------------------------------- 1 | # a comment 2 | 127.0.0.1 localhost 3 | # second alias for same ip. 'man hosts' does not allow it 4 | # but the ubuntu and probably other distributions treat it as 5 | # 127.0.0.1 localhost myname 6 | 127.0.0.1 myname 7 | ::1 ip6-localhost ip6-loopback 8 | fe00::0 ip6-localnet 9 | ff00::0 ip6-mcastprefix 10 | ff02::1 ip6-allnodes 11 | ff02::2 ip6-allrouters -------------------------------------------------------------------------------- /doc/ref/internals/exceptions.rst: -------------------------------------------------------------------------------- 1 | ========== 2 | Exceptions 3 | ========== 4 | 5 | Salt-specific exceptions should be thrown as often as possible so the various 6 | interfaces to Salt (CLI, API, etc) can handle those errors appropriately and 7 | display error messages appropriately. 8 | 9 | .. autosummary:: 10 | :toctree: 11 | :template: autosummary.rst.tmpl 12 | 13 | salt.exceptions 14 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/issue-1879/step-1.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('issue-1879') }}: 2 | file.append: 3 | - text: | 4 | # set variable identifying the chroot you work in (used in the prompt below) 5 | if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then 6 | debian_chroot=$(cat /etc/debian_chroot) 7 | fi 8 | 9 | -------------------------------------------------------------------------------- /tests/integration/files/pillar/base/generic.sls: -------------------------------------------------------------------------------- 1 | monty: python 2 | os: {{ grains['os'] }} 3 | {% if grains['os'] == 'Fedora' %} 4 | class: redhat 5 | {% else %} 6 | class: other 7 | {% endif %} 8 | 9 | knights: 10 | - Lancelot 11 | - Galahad 12 | - Bedevere 13 | - Robin 14 | 15 | level1: 16 | level2: foo 17 | 18 | companions: 19 | three: 20 | - liz 21 | - jo 22 | - sarah jane 23 | -------------------------------------------------------------------------------- /doc/topics/installation/gentoo.rst: -------------------------------------------------------------------------------- 1 | ====== 2 | Gentoo 3 | ====== 4 | 5 | Salt can be easily installed on Gentoo via Portage: 6 | 7 | .. code-block:: bash 8 | 9 | emerge app-admin/salt 10 | 11 | Post-installation tasks 12 | ======================= 13 | 14 | Now go to the :doc:`Configuring Salt` page. 15 | 16 | .. _GitHub downloads: https://github.com/saltstack/salt/downloads 17 | -------------------------------------------------------------------------------- /salt/runners/search.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Runner frontend to search system 3 | ''' 4 | 5 | # Import salt libs 6 | import salt.search 7 | import salt.output 8 | 9 | 10 | def query(term): 11 | ''' 12 | Query the search system 13 | ''' 14 | search = salt.search.Search(__opts__) 15 | result = search.query(term) 16 | salt.output.display_output(result, 'pprint', __opts__) 17 | return result 18 | -------------------------------------------------------------------------------- /tests/integration/modules/files/hosts: -------------------------------------------------------------------------------- 1 | # a comment 2 | 127.0.0.1 localhost 3 | # second alias for same ip. 'man hosts' does not allow it 4 | # but the ubuntu and probably other distributions treat it as 5 | # 127.0.0.1 localhost myname 6 | 127.0.0.1 myname 7 | ::1 ip6-localhost ip6-loopback 8 | fe00::0 ip6-localnet 9 | ff00::0 ip6-mcastprefix 10 | ff02::1 ip6-allnodes 11 | ff02::2 ip6-allrouters -------------------------------------------------------------------------------- /doc/ref/pillar/all/index.rst: -------------------------------------------------------------------------------- 1 | .. _all-salt.pillars: 2 | 3 | =================================== 4 | Full list of builtin pillar modules 5 | =================================== 6 | 7 | .. currentmodule:: salt.pillar 8 | 9 | .. autosummary:: 10 | :toctree: 11 | :template: autosummary.rst.tmpl 12 | 13 | cmd_json 14 | cmd_yaml 15 | hiera 16 | mongo 17 | pillar_ldap 18 | puppet 19 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include AUTHORS 2 | include HACKING.rst 3 | include LICENSE 4 | include README.rst 5 | include requirements.txt 6 | include tests/*.py 7 | recursive-include tests * 8 | include tests/integration/modules/files/* 9 | include tests/integration/files/* 10 | include tests/unit/templates/files/* 11 | recursive-include doc * 12 | recursive-include scripts * 13 | include conf/* 14 | recursive-include salt *.jinja 15 | -------------------------------------------------------------------------------- /doc/gen_gource: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script is used to generate the gource video released with each release of Salt 4 | # 5 | # 6 | gource -1280x720 -s 0.5 --stop-at-end --hide filenames --highlight-all-users --file-filter po -a 5 --camera-mode overview --disable-progress --disable-bloom --output-ppm-stream - --output-framerate 30 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libvpx -b 10000K gource.webm 7 | 8 | -------------------------------------------------------------------------------- /doc/ref/runners/all/index.rst: -------------------------------------------------------------------------------- 1 | .. _all-salt.runners: 2 | 3 | =========================== 4 | Full list of runner modules 5 | =========================== 6 | 7 | .. currentmodule:: salt.runners 8 | 9 | .. autosummary:: 10 | :toctree: 11 | :template: autosummary.rst.tmpl 12 | 13 | cache 14 | doc 15 | jobs 16 | launchd 17 | manage 18 | network 19 | search 20 | state 21 | winrepo 22 | -------------------------------------------------------------------------------- /scripts/salt-minion: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | This script is used to kick off a salt minion daemon 4 | ''' 5 | 6 | from salt.scripts import salt_minion 7 | from multiprocessing import freeze_support 8 | 9 | 10 | if __name__ == '__main__': 11 | # This handles the bootstrapping code that is included with frozen 12 | # scripts. It is a no-op on unfrozen code. 13 | freeze_support() 14 | salt_minion() 15 | -------------------------------------------------------------------------------- /doc/_ext/saltdocs.py: -------------------------------------------------------------------------------- 1 | def setup(app): 2 | """Additions and customizations to Sphinx that are useful for documenting 3 | the Salt project. 4 | 5 | """ 6 | app.add_crossref_type(directivename="conf_master", rolename="conf_master", 7 | indextemplate="pair: %s; conf/master") 8 | app.add_crossref_type(directivename="conf_minion", rolename="conf_minion", 9 | indextemplate="pair: %s; conf/minion") 10 | -------------------------------------------------------------------------------- /doc/ref/renderers/all/index.rst: -------------------------------------------------------------------------------- 1 | .. _all-salt.renderers: 2 | 3 | ===================================== 4 | Full list of builtin renderer modules 5 | ===================================== 6 | 7 | .. currentmodule:: salt.renderers 8 | 9 | .. autosummary:: 10 | :toctree: 11 | :template: autosummary.rst.tmpl 12 | 13 | jinja 14 | json 15 | mako 16 | py 17 | pydsl 18 | stateconf 19 | wempy 20 | yaml 21 | -------------------------------------------------------------------------------- /pkg/rpm/README.fedora: -------------------------------------------------------------------------------- 1 | These packages are *optional* dependencies for salt. By default, they are not included in the salt RPMs. 2 | Install any of these packages to enable the functionality within salt. 3 | 4 | MySQL-python 5 | libvirt-python 6 | python-mako 7 | pymongo 8 | python-redis / redis 9 | 10 | A semi-canonical list of the optional salt modules can be found at 11 | https://github.com/saltstack/salt/blob/develop/doc/conf.py#L30 12 | -------------------------------------------------------------------------------- /tests/integration/files/ssh/authorized_keys: -------------------------------------------------------------------------------- 1 | command="/usr/local/lib/ssh-helper" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== github.com 2 | -------------------------------------------------------------------------------- /tests/integration/files/ssh/known_hosts: -------------------------------------------------------------------------------- 1 | |1|muzcBqgq7+ByUY7aLICytOff8UI=|rZ1JBNlIOqRnwwsJl9yP+xMxgf8= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== 2 | -------------------------------------------------------------------------------- /doc/ref/output/all/index.rst: -------------------------------------------------------------------------------- 1 | .. _all-salt.output: 2 | 3 | =================================== 4 | Full list of builtin output modules 5 | =================================== 6 | 7 | .. currentmodule:: salt.output 8 | 9 | .. autosummary:: 10 | :toctree: 11 | :template: autosummary.rst.tmpl 12 | 13 | grains 14 | highstate 15 | json_out 16 | key 17 | nested 18 | overstatestage 19 | pprint_out 20 | raw 21 | txt 22 | yaml_out 23 | -------------------------------------------------------------------------------- /salt/modules/key.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Functions to view the minion's public key information 3 | ''' 4 | 5 | # Import python libs 6 | import os 7 | 8 | # Import Salt libs 9 | import salt.utils 10 | 11 | def finger(): 12 | ''' 13 | Return the minion's public key fingerprint 14 | 15 | CLI Example:: 16 | 17 | salt '*' key.finger 18 | ''' 19 | return salt.utils.pem_finger( 20 | os.path.join(__opts__['pki_dir'], 'minion.pub') 21 | ) 22 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/recurse_ok.sls: -------------------------------------------------------------------------------- 1 | snmpd: 2 | pkg: 3 | - installed 4 | service: 5 | - running 6 | - require: 7 | - pkg: snmpd 8 | - watch: 9 | - file: /etc/snmp/snmpd.conf 10 | 11 | /etc/snmp/snmpd.conf: 12 | file: 13 | - managed 14 | - source: salt://snmpd/snmpd.conf.jinja 15 | - template: jinja 16 | - user: root 17 | - group: root 18 | - mode: "0600" 19 | - require: 20 | - pkg: snmpd 21 | 22 | -------------------------------------------------------------------------------- /salt/utils/dictupdate.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Alex Martelli's soulution for recursive dict update from 3 | http://stackoverflow.com/a/3233356 4 | ''' 5 | 6 | # Import python libs 7 | import collections 8 | 9 | 10 | def update(dest, upd): 11 | for key, val in upd.iteritems(): 12 | if isinstance(val, collections.Mapping): 13 | ret = update(dest.get(key, {}), val) 14 | dest[key] = ret 15 | else: 16 | dest[key] = upd[key] 17 | return dest 18 | -------------------------------------------------------------------------------- /doc/ref/returners/all/index.rst: -------------------------------------------------------------------------------- 1 | .. _all-salt.returners: 2 | 3 | ===================================== 4 | Full list of builtin returner modules 5 | ===================================== 6 | 7 | .. currentmodule:: salt.returners 8 | 9 | .. autosummary:: 10 | :toctree: 11 | :template: autosummary.rst.tmpl 12 | 13 | cassandra_return 14 | local 15 | mongo_future_return 16 | mongo_return 17 | mysql 18 | postgres 19 | redis_return 20 | smtp_return 21 | syslog_return 22 | -------------------------------------------------------------------------------- /tests/integration/files/conf/master: -------------------------------------------------------------------------------- 1 | publish_port: 64505 2 | ret_port: 64506 3 | worker_threads: 2 4 | root_dir: /tmp/salttest 5 | pidfile: masterpid 6 | pki_dir: pki 7 | cachedir: cache 8 | timeout: 1 9 | sock_dir: .salt-unix 10 | open_mode: True 11 | syndic_master: localhost 12 | peer: 13 | '.*': 14 | - 'test.*' 15 | log_file: master 16 | key_logfile: key 17 | token_file: /tmp/ksfjhdgiuebfgnkefvsikhfjdgvkjahcsidk 18 | 19 | file_buffer_size: 8192 20 | 21 | ext_pillar: 22 | - cmd_yaml: cat ext.yaml 23 | -------------------------------------------------------------------------------- /doc/_incl/requisite_incl.rst: -------------------------------------------------------------------------------- 1 | **Before continuing** make sure you have a working Salt installation by 2 | following the :doc:`installation ` and the :doc:`configuration 3 | ` instructions. 4 | 5 | .. admonition:: Stuck? 6 | 7 | There are many ways to :doc:`get help from the Salt community 8 | ` including our 9 | `mailing list `_ 10 | and our `IRC channel `_ #salt. 11 | -------------------------------------------------------------------------------- /salt/returners/syslog_return.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Return data to the host operating system's syslog facility 3 | 4 | Required python modules: syslog, json 5 | 6 | The syslog returner simply reuses the operating system's syslog 7 | facility to log return data 8 | ''' 9 | 10 | # Import python libs 11 | import syslog 12 | import json 13 | 14 | 15 | def __virtual__(): 16 | return 'syslog' 17 | 18 | 19 | def returner(ret): 20 | ''' 21 | Return data to the local syslog 22 | ''' 23 | syslog.syslog(syslog.LOG_INFO, 'salt-minion: {0}'.format(json.dumps(ret))) 24 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/issue-2068-template-str.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('issue-2068-template-str') }}: 2 | virtualenv.managed: 3 | - no_site_packages: True 4 | - distribute: True 5 | 6 | pep8-pip: 7 | pip.installed: 8 | - name: pep8 9 | - bin_env: {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('issue-2068-template-str') }} 10 | - mirrors: http://testpypi.python.org/pypi 11 | - require: 12 | - virtualenv: {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('issue-2068-template-str') }} 13 | -------------------------------------------------------------------------------- /salt/states/stateconf.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Stateconf System 3 | ================ 4 | 5 | The stateconf system is intended for use only with the stateconf renderer. This 6 | State module presents the set function. This function does not execute any 7 | functionality, but is used to interact with the stateconf renderer. 8 | ''' 9 | 10 | 11 | def _no_op(name, **kws): 12 | ''' 13 | No-op state to support state config via the stateconf renderer. 14 | ''' 15 | return dict(name=name, result=True, changes={}, comment='') 16 | 17 | set = context = _no_op # pylint: disable-msg=C0103 18 | -------------------------------------------------------------------------------- /doc/ref/modules/all/salt.modules.pkg.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | salt.modules.pkg 3 | ================ 4 | 5 | .. py:module:: salt.modules.pkg 6 | :synopsis: A virtual module for installing software packages 7 | 8 | ``pkg`` is a virtual module that is fulfilled by one of the following modules: 9 | 10 | * :mod:`salt.modules.apt` 11 | * :mod:`salt.modules.ebuild` 12 | * :mod:`salt.modules.freebsdpkg` 13 | * :mod:`salt.modules.pacman` 14 | * :mod:`salt.modules.yumpkg` 15 | * :mod:`salt.modules.yumpkg5` 16 | * :mod:`salt.modules.zypper` 17 | * :mod:`salt.modules.brew` 18 | * :mod:`salt.modules.win_pkg` 19 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/issue-2028-pip-installed.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('issue-2028-pip-installed') }}: 2 | virtualenv.managed: 3 | - no_site_packages: True 4 | - distribute: True 5 | 6 | supervisord-pip: 7 | pip.installed: 8 | - name: supervisor 9 | - bin_env: {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('issue-2028-pip-installed') }} 10 | - mirrors: http://testpypi.python.org/pypi 11 | - require: 12 | - virtualenv: {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('issue-2028-pip-installed') }} 13 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/issue-2068-template-str-no-dot.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('issue-2068-template-str') }}: 2 | virtualenv: 3 | - managed 4 | - no_site_packages: True 5 | - distribute: True 6 | 7 | pep8-pip: 8 | pip: 9 | - installed 10 | - name: pep8 11 | - bin_env: {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('issue-2068-template-str') }} 12 | - mirrors: http://testpypi.python.org/pypi 13 | - require: 14 | - virtualenv: {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('issue-2068-template-str') }} 15 | -------------------------------------------------------------------------------- /doc/ref/configuration/examples.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | Configuration file examples 3 | =========================== 4 | 5 | .. _configuration-examples-master: 6 | 7 | .. contents:: 8 | :local: 9 | :depth: 1 10 | 11 | Example master configuration file 12 | ================================= 13 | 14 | .. literalinclude:: ../../../conf/master 15 | :language: yaml 16 | :linenos: 17 | 18 | .. _configuration-examples-minion: 19 | 20 | Example minion configuration file 21 | ================================= 22 | 23 | .. literalinclude:: ../../../conf/minion 24 | :language: yaml 25 | :linenos: 26 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/pip-installed-weird-install.sls: -------------------------------------------------------------------------------- 1 | {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('pip-installed-weird-install') }}: 2 | virtualenv.managed: 3 | - no_site_packages: True 4 | - distribute: True 5 | 6 | carbon-weird-setup: 7 | pip.installed: 8 | - name: carbon 9 | - no_deps: True 10 | - bin_env: {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('pip-installed-weird-install') }} 11 | - mirrors: http://testpypi.python.org/pypi 12 | - require: 13 | - virtualenv: {{ salt['runtests_helpers.get_sys_temp_dir_for_path']('pip-installed-weird-install') }} 14 | -------------------------------------------------------------------------------- /salt/renderers/json.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # Import python libs 4 | import json 5 | 6 | 7 | def render(json_data, env='', sls='', **kws): 8 | ''' 9 | Accepts JSON as a string or as a file object and runs it through the JSON 10 | parser. 11 | 12 | :rtype: A Python data structure 13 | ''' 14 | if not isinstance(json_data, basestring): 15 | json_data = json_data.read() 16 | 17 | if json_data.startswith('#!'): 18 | json_data = json_data[json_data.find('\n')+1:] 19 | if not json_data.strip(): 20 | return {} 21 | return json.loads(json_data) 22 | 23 | -------------------------------------------------------------------------------- /pkg/arch/Makefile: -------------------------------------------------------------------------------- 1 | # Convenience targets for building and installing Arch packages 2 | # prior to committing changes to git. 3 | 4 | PKGNAME=salt 5 | 6 | local: 7 | -rm -rf ../../build 8 | -rm $(PKGNAME)-*.pkg.tar.xz 9 | -rm -rf pkg 10 | if [ "$$(id -u)" -eq 0 ]; \ 11 | then \ 12 | makepkg -f -p PKGBUILD-local --asroot; \ 13 | else \ 14 | makepkg -f -p PKGBUILD-local; \ 15 | fi 16 | rm -rf pkg 17 | -rm -rf ../../build 18 | 19 | install: local 20 | -for script in /etc/rc.d/salt*; \ 21 | do \ 22 | "$$script" stop; \ 23 | done 24 | -yes | pacman -R $(PKGNAME) 25 | yes | pacman -U $(PKGNAME)-*.pkg.tar.xz 26 | -------------------------------------------------------------------------------- /tests/integration/states/compiler.py: -------------------------------------------------------------------------------- 1 | ''' 2 | tests for host state 3 | ''' 4 | import integration 5 | 6 | 7 | class CompileTest(integration.ModuleCase): 8 | ''' 9 | Validate the state compiler 10 | ''' 11 | def test_multi_state(self): 12 | ''' 13 | Test the error with multiple states of the same type 14 | ''' 15 | ret = self.run_function('state.sls', mods='fuzz.multi_state') 16 | # Verify that the return is a list, aka, an error 17 | self.assertIsInstance(ret, list) 18 | 19 | 20 | if __name__ == '__main__': 21 | from integration import run_tests 22 | run_tests(CompileTest) 23 | -------------------------------------------------------------------------------- /doc/_templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% set title = 'Page not found' %} 3 | 4 | {% block body %} 5 |

404: Page not found

6 | 7 |

The page you are requesting cannot be found. Please try one of the following 8 | pages instead:

9 | 10 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /salt/pillar/cmd_json.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Execute a command and read the output as JSON. The JSON data is then directly 3 | overlaid onto the minion's pillar data 4 | ''' 5 | 6 | # Import python libs 7 | import logging 8 | import json 9 | 10 | # Set up logging 11 | log = logging.getLogger(__name__) 12 | 13 | 14 | def ext_pillar(pillar, command): 15 | ''' 16 | Execute a command and read the output as JSON 17 | ''' 18 | try: 19 | return json.loads(__salt__['cmd.run'](command)) 20 | except Exception: 21 | log.critical( 22 | 'JSON data from {0} failed to parse'.format(command) 23 | ) 24 | return {} 25 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py26,py27,py32 3 | 4 | [testenv:py26] 5 | setenv = VIRTUAL_ENV={envdir} 6 | deps = -r{toxinidir}/requirements.txt 7 | unittest2 8 | mock 9 | coverage 10 | commands = 11 | coverage run ./tests/runtests.py 12 | 13 | [testenv:py27] 14 | setenv = VIRTUAL_ENV={envdir} 15 | deps = -r{toxinidir}/requirements.txt 16 | mock 17 | coverage 18 | commands = 19 | coverage run ./tests/runtests.py 20 | 21 | [testenv:py32] 22 | basepython = python3.2 23 | setenv = VIRTUAL_ENV={envdir} 24 | deps = 25 | -r{toxinidir}/requirements.txt 26 | mock 27 | coverage 28 | commands = 29 | coverage run ./tests/runtests.py -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Salt - Remote execution system 2 | 3 | Copyright 2011 Thomas S Hatch 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | -------------------------------------------------------------------------------- /salt/output/pprint_out.py: -------------------------------------------------------------------------------- 1 | ''' 2 | The python pretty print system was the default outputter. This outputter 3 | simply passed the data passed into it through the pprint module. 4 | ''' 5 | 6 | # Import python libs 7 | import pprint 8 | 9 | 10 | def __virtual__(): 11 | ''' 12 | Change the name to pprint 13 | ''' 14 | return 'pprint' 15 | 16 | 17 | def output(data): 18 | ''' 19 | Print out via pretty print 20 | ''' 21 | if isinstance(data, Exception): 22 | data = str(data) 23 | if 'output_indent' in __opts__ and __opts__['output_indent'] >= 0: 24 | return pprint.pformat(data, indent=__opts__['output_indent']) 25 | return pprint.pformat(data) 26 | -------------------------------------------------------------------------------- /pkg/windows/installer/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Salt - Remote execution system 2 | 3 | Copyright 2011 Thomas S Hatch 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/testfile: -------------------------------------------------------------------------------- 1 | Scene 24 2 | 3 | 4 | OLD MAN: Ah, hee he he ha! 5 | ARTHUR: And this enchanter of whom you speak, he has seen the grail? 6 | OLD MAN: Ha ha he he he he! 7 | ARTHUR: Where does he live? Old man, where does he live? 8 | OLD MAN: He knows of a cave, a cave which no man has entered. 9 | ARTHUR: And the Grail... The Grail is there? 10 | OLD MAN: Very much danger, for beyond the cave lies the Gorge 11 | of Eternal Peril, which no man has ever crossed. 12 | ARTHUR: But the Grail! Where is the Grail!? 13 | OLD MAN: Seek you the Bridge of Death. 14 | ARTHUR: The Bridge of Death, which leads to the Grail? 15 | OLD MAN: Hee hee ha ha! 16 | 17 | -------------------------------------------------------------------------------- /salt/pillar/cmd_yaml.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Execute a command and read the output as YAML. The YAML data is then directly 3 | overlaid onto the minion's pillar data 4 | ''' 5 | 6 | # Import python libs 7 | import logging 8 | 9 | # Import third party libs 10 | import yaml 11 | 12 | # Set up logging 13 | log = logging.getLogger(__name__) 14 | 15 | 16 | def ext_pillar(pillar, command): 17 | ''' 18 | Execute a command and read the output as YAML 19 | ''' 20 | try: 21 | return yaml.safe_load(__salt__['cmd.run']('{0}'.format(command))) 22 | except Exception: 23 | log.critical( 24 | 'YAML data from {0} failed to parse'.format(command) 25 | ) 26 | return {} 27 | -------------------------------------------------------------------------------- /salt/utils/winapi.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import pythoncom 3 | import threading 4 | import wmi 5 | 6 | 7 | log = logging.getLogger(__name__) 8 | 9 | class Com(object): 10 | def __init__(self): 11 | self.need_com_init = not self._is_main_thread() 12 | 13 | def _is_main_thread(self): 14 | return threading.current_thread().name == 'MainThread' 15 | 16 | def __enter__(self): 17 | if self.need_com_init: 18 | log.debug("Initializing COM library") 19 | pythoncom.CoInitialize() 20 | 21 | def __exit__(self, exc_type, exc_value, traceback): 22 | if self.need_com_init: 23 | log.debug("Uninitializing COM library") 24 | pythoncom.CoUninitialize() 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.py[co] 3 | pkg/arch/*.tar.xz 4 | *.swp 5 | doc/_build 6 | dist 7 | MANIFEST 8 | 9 | # virtualenv 10 | # - ignores directories of a virtualenv when you create it right on 11 | # top of salt such as 12 | # - /some/path$ git clone https://github.com/thatch45/salt.git 13 | # - /some/path$ virtualenv --python=/usr/bin/python2.6 salt 14 | bin/ 15 | include/ 16 | lib/ 17 | pip/ 18 | share/ 19 | tests/integration/tmp/ 20 | 21 | # tox - ignore any tox-created virtualenv dirs 22 | .tox 23 | 24 | # setuptools stuff 25 | *.egg-info 26 | 27 | # code coverage outputs genereated by coverage.py 28 | .coverage 29 | coverage.xml 30 | htmlcov/ 31 | /.project 32 | /.pydevproject 33 | /.idea 34 | 35 | # ignore ctags file 36 | tags 37 | -------------------------------------------------------------------------------- /tests/integration/files/conf/minion: -------------------------------------------------------------------------------- 1 | # basic config 2 | master: localhost 3 | master_port: 64506 4 | root_dir: /tmp/salttest 5 | pki_dir: pki 6 | id: minion 7 | cachedir: cachedir 8 | sock_dir: minion_sock 9 | #acceptance_wait_time: = 1 10 | open_mode: True 11 | log_file: minion 12 | 13 | # module extension 14 | test.foo: baz 15 | hosts.file: /tmp/salt-tests-tmpdir/hosts 16 | aliases.file: /tmp/salt-tests-tmpdir/aliases 17 | integration.test: True 18 | 19 | # Grains addons 20 | grains: 21 | test_grain: cheese 22 | script: grail 23 | alot: many 24 | planets: 25 | - mercury 26 | - venus 27 | - earth 28 | - mars 29 | level1: 30 | level2: foo 31 | companions: 32 | one: 33 | - susan 34 | - ian 35 | - barbara 36 | -------------------------------------------------------------------------------- /tests/integration/files/conf/sub_minion: -------------------------------------------------------------------------------- 1 | # basic config 2 | master: localhost 3 | master_port: 64506 4 | root_dir: /tmp/subsalttest 5 | pki_dir: pki 6 | id: sub_minion 7 | cachedir: cachedir 8 | sock_dir: sub_minion_sock 9 | #acceptance_wait_time: 1 10 | open_mode: True 11 | log_file: minion 12 | 13 | # module extension 14 | test.foo: baz 15 | hosts.file: /tmp/salt-tests-tmpdir/hosts 16 | aliases.file: /tmp/salt-tests-tmpdir/aliases 17 | integration.test: True 18 | 19 | # Grains addons 20 | grains: 21 | test_grain: spam 22 | role: sub 23 | planets: 24 | - jupiter 25 | - saturn 26 | - uranus 27 | - neptune 28 | level1: 29 | level2: bar 30 | companions: 31 | two: 32 | - jamie 33 | - zoe 34 | 35 | ipc_mode: tcp 36 | -------------------------------------------------------------------------------- /doc/topics/master_tops/index.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | Master Tops System 3 | ================== 4 | 5 | In 0.10.4 the `external_nodes` system was upgraded to allow for modular 6 | subsystems to be used to generate the top file data for a highstate run on 7 | the master. 8 | 9 | The old `external_nodes` option still works, but will be removed in the 10 | future in favor of the new `master_tops` option which uses the modular 11 | system instead. The master tops system contains a number of subsystems that 12 | are loaded via the Salt loader interfaces like modules, states, returners, 13 | runners, etc. 14 | 15 | Using the new `master_tops` option is simple: 16 | 17 | .. code-block:: yaml 18 | 19 | master_tops: 20 | ext_nodes: cobbler-external-nodes 21 | -------------------------------------------------------------------------------- /salt/output/yaml_out.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Output data in YAML, this outputter defaults to printing in YAML block mode 3 | for better readability. 4 | ''' 5 | 6 | # Import third party libs 7 | import yaml 8 | 9 | 10 | def __virtual__(): 11 | return 'yaml' 12 | 13 | 14 | def output(data): 15 | ''' 16 | Print out YAML using the block mode 17 | ''' 18 | if 'output_indent' in __opts__: 19 | if __opts__['output_indent'] >= 0: 20 | return yaml.dump( 21 | data, default_flow_style=False, 22 | indent=__opts__['output_indent'] 23 | ) 24 | # Disable indentation 25 | return yaml.dump(data, default_flow_style=True, indent=0) 26 | return yaml.dump(data, default_flow_style=False) 27 | -------------------------------------------------------------------------------- /doc/_templates/modules-sidebar.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 25 | 26 | 31 | -------------------------------------------------------------------------------- /tests/integration/files/file/base/_modules/runtests_helpers.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | runtests_helpers.py 4 | ~~~~~~~~~~~~~~~~~~~ 5 | 6 | :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` 7 | :copyright: © 2012 by the SaltStack Team, see AUTHORS for more details. 8 | :license: Apache 2.0, see LICENSE for more details. 9 | ''' 10 | 11 | # Import python libs 12 | import os 13 | import tempfile 14 | 15 | SYS_TMP_DIR = tempfile.gettempdir() 16 | # This tempdir path is defined on tests.integration.__init__ 17 | TMP = os.path.join(SYS_TMP_DIR, 'salt-tests-tmpdir') 18 | 19 | 20 | def get_salt_temp_dir_for_path(*path): 21 | return os.path.join(TMP, *path) 22 | 23 | 24 | def get_sys_temp_dir_for_path(*path): 25 | return os.path.join(SYS_TMP_DIR, *path) 26 | -------------------------------------------------------------------------------- /salt/modules/eix.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Support for Eix 3 | 4 | ''' 5 | 6 | import salt.utils 7 | 8 | def __virtual__(): 9 | ''' 10 | Only work on Gentoo systems with eix installed 11 | ''' 12 | if __grains__['os'] == 'Gentoo' and salt.utils.which('eix'): 13 | return 'eix' 14 | return False 15 | 16 | 17 | def sync(): 18 | ''' 19 | Sync portage/overlay trees and update the eix database 20 | 21 | CLI Example:: 22 | 23 | salt '*' eix.sync 24 | ''' 25 | cmd = 'eix-sync -q' 26 | return __salt__['cmd.retcode'](cmd) == 0 27 | 28 | 29 | def update(): 30 | ''' 31 | Update the eix database 32 | 33 | CLI Example:: 34 | 35 | salt '*' eix.update 36 | ''' 37 | cmd = 'eix-update --quiet' 38 | return __salt__['cmd.retcode'](cmd) == 0 39 | -------------------------------------------------------------------------------- /pkg/ebuild/salt-0.8.7.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2011 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | # $Header: $ 4 | # 5 | # http://devmanual.gentoo.org/index.html 6 | # 7 | 8 | PYTHON_DEPEND="2" 9 | RESTRICT_PYTHON_ABIS="3.*" 10 | 11 | inherit python 12 | 13 | DESCRIPTION="remote execution manager" 14 | HOMEPAGE="https://github.com/thatch45/salt" 15 | SRC_URI="https://github.com/downloads/thatch45/salt/salt-0.8.7.tar.gz" 16 | 17 | #LICENSE="Apache" 18 | SLOT="0" 19 | KEYWORDS="-* amd64 x86" 20 | IUSE="" 21 | 22 | RDEPEND="dev-lang/python 23 | dev-python/pycrypto 24 | dev-python/m2crypto 25 | dev-python/pyyaml 26 | dev-python/pyzmq" 27 | DEPEND="${RDEPEND}" 28 | 29 | src_install() { 30 | ./setup.py install --root=${D} --optimize=1 || die 31 | } 32 | 33 | -------------------------------------------------------------------------------- /pkg/ebuild/salt-0.7.0.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2011 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | # $Header: $ 4 | # 5 | # http://devmanual.gentoo.org/index.html 6 | # 7 | 8 | PYTHON_DEPEND="2" 9 | RESTRICT_PYTHON_ABIS="3.*" 10 | 11 | inherit python 12 | 13 | DESCRIPTION="remote execution manager" 14 | HOMEPAGE="https://github.com/thatch45/salt" 15 | SRC_URI="https://github.com/downloads/thatch45/salt/salt-0.7.0.tar.gz" 16 | 17 | #LICENSE="GPL-2" 18 | SLOT="0" 19 | KEYWORDS="-* amd64 x86" 20 | IUSE="" 21 | 22 | RDEPEND="dev-lang/python 23 | dev-ruby/facter 24 | dev-python/pycrypto 25 | dev-python/m2crypto 26 | dev-python/pyyaml 27 | dev-python/pyzmq" 28 | DEPEND="${RDEPEND}" 29 | 30 | src_install() { 31 | ./setup.py install --root=${D} --optimize=1 || die 32 | } 33 | 34 | -------------------------------------------------------------------------------- /salt/pillar/puppet.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Execute an unmodified puppet_node_classifier and read the output as YAML. 3 | The YAML data is then directly overlaid onto the minion's pillar data. 4 | ''' 5 | 6 | # Import python libs 7 | import logging 8 | 9 | # Import third party libs 10 | import yaml 11 | 12 | # Set up logging 13 | log = logging.getLogger(__name__) 14 | 15 | def ext_pillar(pillar, command): 16 | ''' 17 | Execute an unmodified puppet_node_classifier and read the output as YAML 18 | ''' 19 | try: 20 | data = yaml.safe_load(__salt__['cmd.run']('{0}'.format(command + ' ' + __grains__.get('nodename')))) 21 | data = data['parameters'] 22 | return data 23 | except Exception: 24 | log.critical( 25 | 'YAML data from {0} failed to parse'.format(command) 26 | ) 27 | return {} 28 | -------------------------------------------------------------------------------- /salt/output/json_out.py: -------------------------------------------------------------------------------- 1 | ''' 2 | The JSON output module converts the return data into JSON. 3 | ''' 4 | 5 | # Import python libs 6 | import json 7 | import traceback 8 | import logging 9 | 10 | log = logging.getLogger(__name__) 11 | 12 | 13 | def __virtual__(): 14 | ''' 15 | Rename to json 16 | ''' 17 | return 'json' 18 | 19 | 20 | def output(data): 21 | ''' 22 | Print the output data in JSON 23 | ''' 24 | try: 25 | if 'output_indent' in __opts__: 26 | if __opts__['output_indent'] >= 0: 27 | return json.dumps(data, indent=__opts__['output_indent']) 28 | return json.dumps(data) 29 | return json.dumps(data, indent=4) 30 | except TypeError: 31 | log.debug(traceback.format_exc()) 32 | # Return valid json for unserializable objects 33 | return json.dumps({}) 34 | -------------------------------------------------------------------------------- /tests/integration/modules/rabbitmq.py: -------------------------------------------------------------------------------- 1 | import os 2 | import integration 3 | 4 | 5 | class RabbitModuleTest(integration.ModuleCase): 6 | ''' 7 | Validates the rabbitmqctl functions. 8 | To run these tests, you will need to be able to access the rabbitmqctl 9 | commands. 10 | ''' 11 | def setUp(self): 12 | super(RabbitModuleTest, self).setUp() 13 | ret = self.run_function('cmd.has_exec', ['rabbitmqctl']) 14 | if not ret: 15 | self.skipTest('RabbitMQ not installed') 16 | if os.geteuid() != 0: 17 | self.skipTest('You must be root to run this test') 18 | 19 | def test_user_exists(self): 20 | ''' 21 | Find out whether a user exists. 22 | ''' 23 | ret = self.run_function('rabbitmq.user_exists', ['null_user']) 24 | self.assertEqual(ret, False) 25 | 26 | -------------------------------------------------------------------------------- /doc/topics/nonroot.rst: -------------------------------------------------------------------------------- 1 | ============================================ 2 | Running the Salt Master as Unprivileged User 3 | ============================================ 4 | 5 | While the default setup runs the Salt Master as the root user, it is generally 6 | wise to run servers as an unprivileged user. In Salt 0.9.10 the management 7 | of the running user was greatly improved, the only change needed is to alter 8 | the option ``user`` in the master configuration file and all salt system 9 | components will be updated to function under the new user when the master 10 | is started. 11 | 12 | If running a version older that 0.9.10 then a number of files need to be 13 | owned by the user intended to run the master: 14 | 15 | .. code-block:: bash 16 | 17 | # chown -R /var/cache/salt 18 | # chown -R /var/log/salt 19 | # chown -R /etc/salt/pki 20 | -------------------------------------------------------------------------------- /pkg/rpm/0001-Only-expect-args-if-they-are-actually-passed-in.patch: -------------------------------------------------------------------------------- 1 | From 4d65fbe3ef36e74c41d96f3c33aa3cf35ab4b09b Mon Sep 17 00:00:00 2001 2 | From: Joseph Hall 3 | Date: Tue, 31 Jul 2012 05:34:27 -0600 4 | Subject: [PATCH 12/13] Only expect args if they are actually passed in 5 | 6 | --- 7 | salt/modules/disk.py | 3 ++- 8 | 1 file changed, 2 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/salt/modules/disk.py b/salt/modules/disk.py 11 | index 0fca708..0964962 100644 12 | --- a/salt/modules/disk.py 13 | +++ b/salt/modules/disk.py 14 | @@ -33,7 +33,8 @@ def usage(args=None): 15 | cmd = 'df -kP' 16 | else: 17 | cmd = 'df' 18 | - cmd = cmd + ' -' + args 19 | + if args: 20 | + cmd = cmd + ' -' + args 21 | ret = {} 22 | out = __salt__['cmd.run'](cmd).split('\n') 23 | for line in out: 24 | -- 25 | 1.7.11.2 26 | 27 | -------------------------------------------------------------------------------- /tests/integration/states/cmd.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Tests for the file state 3 | ''' 4 | # Import salt libs 5 | import integration 6 | import tempfile 7 | 8 | 9 | class CMDTest(integration.ModuleCase, 10 | integration.SaltReturnAssertsMixIn): 11 | ''' 12 | Validate the cmd state 13 | ''' 14 | def test_run(self): 15 | ''' 16 | cmd.run 17 | ''' 18 | 19 | ret = self.run_state('cmd.run', name='ls', cwd=tempfile.gettempdir()) 20 | self.assertSaltTrueReturn(ret) 21 | 22 | def test_test_run(self): 23 | ''' 24 | cmd.run test interface 25 | ''' 26 | ret = self.run_state('cmd.run', name='ls', 27 | cwd=tempfile.gettempdir(), test=True) 28 | self.assertSaltNoneReturn(ret) 29 | 30 | 31 | if __name__ == '__main__': 32 | from integration import run_tests 33 | run_tests(CMDTest) 34 | -------------------------------------------------------------------------------- /salt/modules/monit.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Monit service module. This module will create a monit type 3 | service watcher. 4 | ''' 5 | 6 | 7 | def start(name): 8 | ''' 9 | 10 | CLI Example:: 11 | salt '*' monit.start 12 | ''' 13 | cmd = "monit start {0}".format(name) 14 | 15 | return not __salt__['cmd.retcode'](cmd) 16 | 17 | 18 | def stop(name): 19 | ''' 20 | Stops service via monit 21 | 22 | CLI Example:: 23 | 24 | salt '*' monit.stop 25 | ''' 26 | cmd = "monit stop {0}".format(name) 27 | 28 | 29 | return not __salt__['cmd.retcode'](cmd) 30 | 31 | 32 | def restart(name): 33 | ''' 34 | Restart service via monit 35 | 36 | CLI Example:: 37 | 38 | salt '*' monit.restart 39 | ''' 40 | cmd = "monit restart {0}".format(name) 41 | 42 | return not __salt__['cmd.retcode'](cmd) 43 | 44 | -------------------------------------------------------------------------------- /salt/output/txt.py: -------------------------------------------------------------------------------- 1 | ''' 2 | The txt outputter has been developed to make the output from shell 3 | commands on minions appear as they do when the command is executed 4 | on the minion. 5 | ''' 6 | 7 | # Import python libs 8 | import pprint 9 | 10 | 11 | def output(data): 12 | ''' 13 | Output the data in lines, very nice for running commands 14 | ''' 15 | ret = '' 16 | if hasattr(data, 'keys'): 17 | for key in data: 18 | value = data[key] 19 | # Don't blow up on non-strings 20 | try: 21 | for line in value.splitlines(): 22 | ret += '{0}: {1}\n'.format(key, line) 23 | except AttributeError: 24 | ret += '{0}: {1}\n'.format(key, value) 25 | else: 26 | # For non-dictionary data, just use print 27 | ret += '{0}\n'.format(pprint.pformat(data)) 28 | 29 | return ret 30 | 31 | -------------------------------------------------------------------------------- /salt/states/pkgng.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Manage package remote repo using FreeBSD pkgng. 3 | ========================================================================== 4 | 5 | Salt can manage the url pkgng pulls packages from. 6 | ATM the state and module are small so use cases are 7 | typically rather simple: 8 | 9 | .. code-block:: yaml 10 | 11 | pkgng_clients: 12 | pkgng: 13 | - update_packaging_site 14 | - name: "http://192.168.0.2" 15 | ''' 16 | 17 | def update_packaging_site(name): 18 | ret = { 19 | 'name': name, 20 | 'changes': {}, 21 | 'result': False, 22 | 'comment': '' 23 | } 24 | 25 | __salt__['pkgng.update_package_site'](name) 26 | # cmd = 'diff /usr/local/etc/pkg.conf /usr/local/etc/pkg.conf.bak' 27 | # res = __salt__['cmd.run'](cmd) 28 | # ret['changes'] = res 29 | ret['result'] = True 30 | return ret 31 | -------------------------------------------------------------------------------- /doc/ref/states/include.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | Include and Exclude 3 | =================== 4 | 5 | Salt sls files can include other sls files and exclude sls files that have been 6 | otherwise included. This allows for an sls file to easily extend or manipulate 7 | other sls files. 8 | 9 | Exclude 10 | ======= 11 | 12 | The exclude statement, added in Salt 0.10.3 allows an sls to hard exclude 13 | another sls file or a specific id. The component is excluded after the 14 | high data has been compiled, so nothing should be able to override an 15 | exclude. 16 | 17 | Since the exclude can remove an id or an sls the type of component to 18 | exclude needs to be defined. an exclude statement that verifies that the 19 | running highstate does not contain the `http` sls and the `/etc/vimrc` id 20 | would look like this: 21 | 22 | .. code-block:: yaml 23 | 24 | exclude: 25 | - sls: http 26 | - id: /etc/vimrc 27 | -------------------------------------------------------------------------------- /salt/wheel/config.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Manage the master configuration file 3 | ''' 4 | 5 | # Import python libs 6 | import os 7 | 8 | # Import third party libs 9 | import yaml 10 | 11 | # Import salt libs 12 | import salt.config 13 | 14 | 15 | def values(): 16 | ''' 17 | Return the raw values of the config file 18 | ''' 19 | data = salt.config.master_config(__opts__['conf_file']) 20 | data.pop('aes') 21 | data.pop('token_dir') 22 | return data 23 | 24 | 25 | def apply(key, value): 26 | ''' 27 | Set a single key 28 | 29 | .. note:: 30 | 31 | This will strip comments from your config file 32 | ''' 33 | path = __opts__['conf_file'] 34 | if os.path.isdir(path): 35 | path = os.path.join(path, 'master') 36 | data = values() 37 | data[key] = value 38 | with salt.utils.fopen(path, 'w+') as fp_ : 39 | fp_.write(yaml.dump(data, default_flow_style=False)) 40 | -------------------------------------------------------------------------------- /salt/renderers/wempy.py: -------------------------------------------------------------------------------- 1 | # Import python libs 2 | from StringIO import StringIO 3 | 4 | # Import salt libs 5 | from salt.exceptions import SaltRenderError 6 | import salt.utils.templates 7 | 8 | 9 | def render(template_file, env='', sls='', argline='', context=None, **kws): 10 | ''' 11 | Render the data passing the functions and grains into the rendering system 12 | 13 | :rtype: string 14 | ''' 15 | tmp_data = salt.utils.templates.wempy(template_file, to_str=True, 16 | salt=__salt__, 17 | grains=__grains__, 18 | opts=__opts__, 19 | pillar=__pillar__, 20 | env=env, 21 | sls=sls, 22 | context=context, 23 | **kws) 24 | if not tmp_data.get('result', False): 25 | raise SaltRenderError(tmp_data.get('data', 26 | 'Unknown render error in the wempy renderer')) 27 | return StringIO(tmp_data['data']) 28 | -------------------------------------------------------------------------------- /doc/topics/targeting/nodegroups.rst: -------------------------------------------------------------------------------- 1 | =========== 2 | Node groups 3 | =========== 4 | 5 | .. glossary:: 6 | 7 | Node group 8 | A predefined group of minions declared in the master configuration file 9 | :conf_master:`nodegroups` setting as a compound target. 10 | 11 | Nodegroups are declared using a compound target specification. The compound 12 | target documentation can be found here: 13 | 14 | :doc:`Compound Matchers ` 15 | 16 | For example, in the master config file :conf_master:`nodegroups` setting:: 17 | 18 | nodegroups: 19 | group1: 'L@foo.domain.com,bar.domain.com,baz.domain.com or bl*.domain.com' 20 | group2: 'G@os:Debian and foo.domain.com' 21 | 22 | Specify a nodegroup via the ``-N`` option at the command-line:: 23 | 24 | salt -N group1 test.ping 25 | 26 | Specify a nodegroup with ``- match: nodegroup`` in a :term:`top file`:: 27 | 28 | base: 29 | group1: 30 | - match: nodegroup 31 | - webserver 32 | -------------------------------------------------------------------------------- /tests/integration/shell/master.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | tests.integration.shell.master 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 | 6 | :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` 7 | :copyright: © 2012 by the SaltStack Team, see AUTHORS for more details. 8 | :license: Apache 2.0, see LICENSE for more details. 9 | ''' 10 | 11 | # Import python libs 12 | import sys 13 | 14 | # Import salt libs 15 | from saltunittest import TestLoader, TextTestRunner 16 | import integration 17 | 18 | 19 | class MasterTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn): 20 | 21 | _call_binary_ = 'salt-master' 22 | 23 | 24 | if __name__ == "__main__": 25 | loader = TestLoader() 26 | tests = loader.loadTestsFromTestCase(MasterTest) 27 | print('Setting up Salt daemons to execute tests') 28 | with integration.TestDaemon(): 29 | runner = TextTestRunner(verbosity=1).run(tests) 30 | sys.exit(runner.wasSuccessful()) 31 | -------------------------------------------------------------------------------- /tests/integration/shell/minion.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | tests.integration.shell.minion 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 | 6 | :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` 7 | :copyright: © 2012 by the SaltStack Team, see AUTHORS for more details. 8 | :license: Apache 2.0, see LICENSE for more details. 9 | ''' 10 | 11 | # Import python libs 12 | import sys 13 | 14 | # Import salt libs 15 | from saltunittest import TestLoader, TextTestRunner 16 | import integration 17 | 18 | 19 | class MinionTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn): 20 | 21 | _call_binary_ = 'salt-minion' 22 | 23 | 24 | if __name__ == "__main__": 25 | loader = TestLoader() 26 | tests = loader.loadTestsFromTestCase(MinionTest) 27 | print('Setting up Salt daemons to execute tests') 28 | with integration.TestDaemon(): 29 | runner = TextTestRunner(verbosity=1).run(tests) 30 | sys.exit(runner.wasSuccessful()) 31 | -------------------------------------------------------------------------------- /tests/integration/shell/syndic.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | tests.integration.shell.syndic 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 | 6 | :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` 7 | :copyright: © 2012 by the SaltStack Team, see AUTHORS for more details. 8 | :license: Apache 2.0, see LICENSE for more details. 9 | ''' 10 | 11 | # Import python libs 12 | import sys 13 | 14 | # Import salt libs 15 | from saltunittest import TestLoader, TextTestRunner 16 | import integration 17 | 18 | 19 | class SyndicTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn): 20 | 21 | _call_binary_ = 'salt-syndic' 22 | 23 | 24 | if __name__ == "__main__": 25 | loader = TestLoader() 26 | tests = loader.loadTestsFromTestCase(SyndicTest) 27 | print('Setting up Salt daemons to execute tests') 28 | with integration.TestDaemon(): 29 | runner = TextTestRunner(verbosity=1).run(tests) 30 | sys.exit(runner.wasSuccessful()) 31 | -------------------------------------------------------------------------------- /doc/ref/states/backup_mode.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | State File Backups 3 | ================== 4 | 5 | In 0.10.2 a new feature was added for backing up files that are replaced by 6 | the file.managed and file.recurse states. The new feature is called the backup 7 | mode. Setting the backup mode is easy, but is can be set in a number of 8 | places. 9 | 10 | The backup_mode can be set in the minion config file: 11 | 12 | .. code-block:: yaml 13 | 14 | backup_mode: minion 15 | 16 | Or it can be set for each file: 17 | 18 | .. code-block:: yaml 19 | 20 | /etc/ssh/sshd_config: 21 | file.managed: 22 | - source: salt://ssh/sshd_config 23 | - backup: minion 24 | 25 | Backed up Files 26 | =============== 27 | 28 | The files will be saved in the minion cachedir under the directory named 29 | ``file_backup``. The files will be in the location relative to where they 30 | were under the root filesystem and be appended with a timestamp. This should 31 | make them easy to browse. 32 | -------------------------------------------------------------------------------- /doc/topics/targeting/index.rst: -------------------------------------------------------------------------------- 1 | ========= 2 | Targeting 3 | ========= 4 | 5 | .. glossary:: 6 | 7 | Targeting 8 | Specifying which minions should run a command or execute a state by 9 | matching against hostnames, or system information, or defined groups, 10 | or even combinations thereof. 11 | 12 | For example the command ``salt web1 apache.signal restart`` to restart the 13 | Apache httpd server specifies the machine ``web1`` as the target and the 14 | command will only be run on that one minion. 15 | 16 | Similarly when using States, the following :term:`top file` specifies that only 17 | the ``web1`` minion should execute the contents of ``webserver.sls``: 18 | 19 | .. code-block:: yaml 20 | 21 | base: 22 | 'web1': 23 | - webserver 24 | 25 | There are many ways to target individual minions or groups of minions in Salt: 26 | 27 | .. toctree:: 28 | :maxdepth: 2 29 | 30 | globbing 31 | grains 32 | nodegroups 33 | compound 34 | batch 35 | -------------------------------------------------------------------------------- /doc/topics/tutorials/cron.rst: -------------------------------------------------------------------------------- 1 | =============================================== 2 | Using cron with Salt 3 | =============================================== 4 | 5 | The Salt Minion can initiate its own highstate using the `salt-call` command. 6 | 7 | .. code-block:: bash 8 | 9 | $ salt-call state.highstate 10 | 11 | 12 | This will cause the minion to check in with the master and ensure it is in the 13 | correct 'state'. 14 | 15 | 16 | Use cron to initiate a highstate 17 | ================================ 18 | 19 | If you would like the Salt Minion to regularly check in with the master you can 20 | use the venerable cron to run the `salt-call` command. 21 | 22 | .. code-block:: bash 23 | 24 | # PATH=/bin:/sbin:/usr/bin:/usr/sbin 25 | 26 | 00 00 * * * salt-call state.highstate 27 | 28 | The above cron entry will run a highstate every day at midnight. 29 | 30 | .. note:: 31 | Be aware that you may need to ensure the PATH for cron includes any 32 | scripts or commands that need to be executed. 33 | -------------------------------------------------------------------------------- /salt/modules/rh_ip/rh5_eth.jinja: -------------------------------------------------------------------------------- 1 | DEVICE={{name}} 2 | {% if addr %}HWADDR={{addr}} 3 | {%endif%}{% if userctl %}USERCTL={{userctl}} 4 | {%endif%}{% if master %}MASTER={{master}} 5 | {%endif%}{% if slave %}SLAVE={{slave}} 6 | {%endif%}{% if vlan %}VLAN={{vlan}} 7 | {%endif%}{% if devtype %}TYPE={{devtype}} 8 | {%endif%}{% if proto %}BOOTPROTO={{proto}} 9 | {%endif%}{% if onboot %}ONBOOT={{onboot}} 10 | {%endif%}{% if ipaddr %}IPADDR={{ipaddr}} 11 | {%endif%}{% if netmask %}NETMASK={{netmask}} 12 | {%endif%}{% if gateway %}GATEWAY={{gateway}} 13 | {%endif%}{% if srcaddr %}SRCADDR={{srcaddr}} 14 | {%endif%}{% if peerdns %}PEERDNS={{peerdns}} 15 | {%endif%}{% if bridge %}BRIDGE={{bridge}} 16 | {%endif%}{% if delay %}DELAY={{delay}} 17 | {%endif%}{%if bonding %}BONDING_OPTS="{%for item in bonding %}{{item}}={{bonding[item]}} {%endfor%}" 18 | {%endif%}{% if ethtool %}ETHTOOL_OPTS="{%for item in ethtool %}{{item}} {{ethtool[item]}} {%endfor%}" 19 | {%endif%} 20 | {% for server in dns -%} 21 | DNS{{loop.index}}={{server}} 22 | {% endfor -%} 23 | -------------------------------------------------------------------------------- /tests/integration/modules/pillar.py: -------------------------------------------------------------------------------- 1 | import integration 2 | 3 | 4 | class PillarModuleTest(integration.ModuleCase): 5 | ''' 6 | Validate the pillar module 7 | ''' 8 | def test_data(self): 9 | ''' 10 | pillar.data 11 | ''' 12 | grains = self.run_function('grains.items') 13 | pillar = self.run_function('pillar.data') 14 | self.assertEqual(pillar['os'], grains['os']) 15 | self.assertEqual(pillar['monty'], 'python') 16 | if grains['os'] == 'Fedora': 17 | self.assertEqual(pillar['class'], 'redhat') 18 | else: 19 | self.assertEqual(pillar['class'], 'other') 20 | 21 | def test_ext_cmd_yaml(self): 22 | ''' 23 | pillar.data for ext_pillar cmd.yaml 24 | ''' 25 | self.assertEqual( 26 | self.run_function('pillar.data')['ext_spam'], 'eggs' 27 | ) 28 | 29 | 30 | if __name__ == '__main__': 31 | from integration import run_tests 32 | run_tests(PillarModuleTest) 33 | -------------------------------------------------------------------------------- /pkg/arch/PKGBUILD-local: -------------------------------------------------------------------------------- 1 | # Maintainer: Thomas S Hatch 2 | # Build the salt package from local files. 3 | # Use this to test Arch installation before committing changes. 4 | pkgname=salt 5 | pkgver=$(date +%Y%m%d) 6 | pkgrel=1 7 | pkgdesc="A remote execution and communication system built on zeromq" 8 | arch=('any') 9 | url="https://github.com/thatch45/salt" 10 | license=('APACHE') 11 | groups=() 12 | depends=('python2' 13 | 'python2-pyzmq' 14 | 'python-m2crypto' 15 | 'python2-yaml' 16 | 'pycrypto' 17 | 'python2-psutil') 18 | makedepends=('git') 19 | provides=() 20 | backup=('etc/salt/master' 21 | 'etc/salt/minion') 22 | options=() 23 | srcdir="$PWD/../.." 24 | 25 | package() { 26 | cd "$srcdir" 27 | 28 | python2 setup.py install --root=$pkgdir/ --optimize=1 29 | 30 | mkdir -p $pkgdir/etc/rc.d/ 31 | cp $srcdir/pkg/arch/salt-master $pkgdir/etc/rc.d/ 32 | cp $srcdir/pkg/arch/salt-minion $pkgdir/etc/rc.d/ 33 | chmod +x $pkgdir/etc/rc.d/* 34 | } 35 | -------------------------------------------------------------------------------- /salt/grains/extra.py: -------------------------------------------------------------------------------- 1 | # Import python libs 2 | import os 3 | 4 | # Import third party libs 5 | import yaml 6 | 7 | 8 | def shell(): 9 | ''' 10 | Return the default shell to use on this system 11 | ''' 12 | # Provides: 13 | # shell 14 | return {'shell': os.environ.get('SHELL', '/bin/sh')} 15 | 16 | def config(): 17 | ''' 18 | Return the grains set in the grains file 19 | ''' 20 | if not 'conf_file' in __opts__: 21 | return {} 22 | if os.path.isdir(__opts__['conf_file']): 23 | gfn = os.path.join( 24 | __opts__['conf_file'], 25 | 'grains' 26 | ) 27 | else: 28 | gfn = os.path.join( 29 | os.path.dirname(__opts__['conf_file']), 30 | 'grains' 31 | ) 32 | if os.path.isfile(gfn): 33 | with open(gfn, 'rb') as fp_: 34 | try: 35 | return yaml.safe_load(fp_.read()) 36 | except Exception: 37 | return {} 38 | return {} 39 | -------------------------------------------------------------------------------- /salt/modules/rh_ip/rh6_eth.jinja: -------------------------------------------------------------------------------- 1 | DEVICE="{{name}}" 2 | {% if addr %}HWADDR="{{addr}}" 3 | {%endif%}{% if userctl %}USERCTL="{{userctl}}" 4 | {%endif%}{% if master %}MASTER="{{master}}" 5 | {%endif%}{% if slave %}SLAVE="{{slave}}" 6 | {%endif%}{% if vlan %}VLAN="{{vlan}}" 7 | {%endif%}{% if devtype %}TYPE="{{devtype}}" 8 | {%endif%}{% if proto %}BOOTPROTO="{{proto}}" 9 | {%endif%}{% if onboot %}ONBOOT="{{onboot}}" 10 | {%endif%}{% if ipaddr %}IPADDR="{{ipaddr}}" 11 | {%endif%}{% if netmask %}NETMASK="{{netmask}}" 12 | {%endif%}{% if gateway %}GATEWAY="{{gateway}}" 13 | {%endif%}{% if srcaddr %}SRCADDR="{{srcaddr}}" 14 | {%endif%}{% if peerdns %}PEERDNS="{{peerdns}}" 15 | {%endif%}{% if bridge %}BRIDGE="{{bridge}}" 16 | {%endif%}{% if delay %}DELAY="{{delay}}" 17 | {%endif%}{%if bonding %}BONDING_OPTS="{%for item in bonding %}{{item}}={{bonding[item]}} {%endfor%}" 18 | {%endif%}{% if ethtool %}ETHTOOL_OPTS="{%for item in ethtool %}{{item}} {{ethtool[item]}} {%endfor%}" 19 | {%endif%} 20 | {% for server in dns -%} 21 | DNS{{loop.index}}="{{server}}" 22 | {% endfor -%} 23 | -------------------------------------------------------------------------------- /salt/modules/event.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Fire events on the minion, events can be fired up to the master 3 | ''' 4 | 5 | # Import salt libs 6 | import salt.crypt 7 | import salt.utils.event 8 | import salt.payload 9 | 10 | 11 | def fire_master(data, tag): 12 | ''' 13 | Fire an event off on the master server 14 | 15 | CLI Example:: 16 | 17 | salt '*' event.fire_master 'stuff to be in the event' 'tag' 18 | ''' 19 | load = {'id': __opts__['id'], 20 | 'tag': tag, 21 | 'data': data, 22 | 'cmd': '_minion_event'} 23 | auth = salt.crypt.SAuth(__opts__) 24 | sreq = salt.payload.SREQ(__opts__['master_uri']) 25 | try: 26 | sreq.send('aes', auth.crypticle.dumps(load)) 27 | except: 28 | pass 29 | return True 30 | 31 | 32 | def fire(data, tag): 33 | ''' 34 | Fire an event on the local minion event bus 35 | 36 | CLI Example:: 37 | 38 | salt '*' event.fire 'stuff to be in the event' 'tag' 39 | ''' 40 | return salt.utils.event.MinionEvent(**__opts__).fire_event(data, tag) 41 | -------------------------------------------------------------------------------- /salt/output/overstatestage.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Display clean output of an overstate stage 3 | ''' 4 | 5 | 6 | #[{'group2': {'match': ['fedora17-2', 'fedora17-3'], 7 | # 'require': ['group1'], 8 | # 'sls': ['nginx', 'edit']} 9 | # } 10 | # ] 11 | 12 | # Import salt libs 13 | import salt.utils 14 | 15 | 16 | def output(data): 17 | ''' 18 | Format the data for printing stage information from the overstate system 19 | ''' 20 | colors = salt.utils.get_colors(__opts__.get('color')) 21 | ostr = '' 22 | for comp in data: 23 | for name, stage in comp.items(): 24 | ostr += '{0}{1}: {2}\n'.format( 25 | colors['LIGHT_BLUE'], 26 | name, 27 | colors['ENDC']) 28 | for key in sorted(stage): 29 | ostr += ' {0}{1}: {2}{3}\n'.format( 30 | colors['LIGHT_BLUE'], 31 | key, 32 | stage[key], 33 | colors['ENDC']) 34 | return ostr 35 | -------------------------------------------------------------------------------- /doc/topics/targeting/batch.rst: -------------------------------------------------------------------------------- 1 | Batch Size 2 | ---------- 3 | 4 | The batch size option allows commands to be executed while maintaining that 5 | only so many hosts are executing the command at one time. This option can 6 | take a percentage or a finite number: 7 | 8 | .. code-block:: bash 9 | 10 | salt \* -b 10 test.ping 11 | 12 | salt -G 'os:RedHat' --batch-size 25% apache.signal restart 13 | 14 | This will only run test.ping on 10 of the targeted minions at a time and then 15 | restart apache on 25% of the minions matching ``os:RedHat`` at a time and work 16 | through them all until the task is complete. This makes jobs like rolling web 17 | server restarts behind a load balancer or doing maintenance on BSD firewalls 18 | using carp much easier with salt. 19 | 20 | The batch system maintains a window of running minions, so, if there are a 21 | total of 150 minions targeted and the batch size is 10, then the command is 22 | sent to 10 minions, when one minion returns then the command is sent to one 23 | additional minion, so that the job is constantly running on 10 minions. 24 | -------------------------------------------------------------------------------- /salt/renderers/mako.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # Import python libs 4 | from StringIO import StringIO 5 | 6 | # Import salt libs 7 | import salt.utils.templates 8 | from salt.exceptions import SaltRenderError 9 | 10 | 11 | def render(template_file, env='', sls='', context=None, tmplpath=None, **kws): 12 | ''' 13 | Render the template_file, passing the functions and grains into the 14 | Mako rendering system. 15 | 16 | :rtype: string 17 | ''' 18 | tmp_data = salt.utils.templates.MAKO(template_file, to_str=True, 19 | salt=__salt__, 20 | grains=__grains__, 21 | opts=__opts__, 22 | pillar=__pillar__, 23 | env=env, 24 | sls=sls, 25 | context=context, 26 | tmplpath=tmplpath, 27 | **kws) 28 | if not tmp_data.get('result', False): 29 | raise SaltRenderError(tmp_data.get('data', 30 | 'Unknown render error in mako renderer')) 31 | return StringIO(tmp_data['data']) 32 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Font: Nexa Light 3 | Style: Regular 4 | URL: http://www.youworkforthem.com/product.php?sku=T3972 5 | Foundry: Fontfabric 6 | Foundry: http://www.youworkforthem.com/designer/105/fontfabric 7 | Copyright: Copyright (c) 2010 by Svetoslav Simov. All rights reserved. 8 | Version: 1.1 9 | Created: October 11, 2012 10 | License: http://www.youworkforthem.com/font-license 11 | License: The WebFont(s) listed in this document must follow the YouWorkForThem 12 | WebFont license rules. All other parties are strictly restricted 13 | from using the WebFonts(s) listed without a purchased license. 14 | All details above must always remain unaltered and visible in your CSS. 15 | */ 16 | 17 | @font-face { 18 | font-family: 'Nexa Light'; 19 | src: url('nexa-light.eot'); 20 | src: url('nexa-light.eot?#iefix') format('embedded-opentype'), 21 | url('nexa-light.woff') format('woff'), 22 | url('nexa-light.ttf') format('truetype'), 23 | url('nexa-light.svg#ywftsvg') format('svg'); 24 | font-weight: normal; 25 | font-style: normal; 26 | } 27 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-xbold.css: -------------------------------------------------------------------------------- 1 | /* 2 | Font: Nexa XBold 3 | Style: Regular 4 | URL: http://www.youworkforthem.com/product.php?sku=T3972 5 | Foundry: Fontfabric 6 | Foundry: http://www.youworkforthem.com/designer/105/fontfabric 7 | Copyright: Copyright (c) 2010 by Svetoslav Simov. All rights reserved. 8 | Version: 1.1 9 | Created: October 11, 2012 10 | License: http://www.youworkforthem.com/font-license 11 | License: The WebFont(s) listed in this document must follow the YouWorkForThem 12 | WebFont license rules. All other parties are strictly restricted 13 | from using the WebFonts(s) listed without a purchased license. 14 | All details above must always remain unaltered and visible in your CSS. 15 | */ 16 | 17 | @font-face { 18 | font-family: 'Nexa XBold'; 19 | src: url('nexa-xbold.eot'); 20 | src: url('nexa-xbold.eot?#iefix') format('embedded-opentype'), 21 | url('nexa-xbold.woff') format('woff'), 22 | url('nexa-xbold.ttf') format('truetype'), 23 | url('nexa-xbold.svg#ywftsvg') format('svg'); 24 | font-weight: normal; 25 | font-style: normal; 26 | } 27 | -------------------------------------------------------------------------------- /doc/ref/states/all/index.rst: -------------------------------------------------------------------------------- 1 | .. _all-salt.states: 2 | 3 | ================================== 4 | Full list of builtin state modules 5 | ================================== 6 | 7 | .. currentmodule:: salt.states 8 | 9 | .. autosummary:: 10 | :toctree: 11 | :template: autosummary.rst.tmpl 12 | 13 | alias 14 | alternatives 15 | cmd 16 | cron 17 | debconfmod 18 | file 19 | gem 20 | git 21 | grains 22 | group 23 | hg 24 | host 25 | keyboard 26 | kmod 27 | layman 28 | locale 29 | makeconf 30 | module 31 | mongodb_database 32 | mongodb_user 33 | mount 34 | mysql_database 35 | mysql_grants 36 | mysql_user 37 | network 38 | pecl 39 | pip 40 | pkgng 41 | pkg 42 | pkgrepo 43 | postgres_database 44 | postgres_user 45 | postgres_group 46 | rabbitmq_user 47 | rabbitmq_vhost 48 | rvm 49 | selinux 50 | service 51 | ssh_auth 52 | ssh_known_hosts 53 | stateconf 54 | supervisord 55 | svn 56 | sysctl 57 | timezone 58 | user 59 | virtualenv 60 | -------------------------------------------------------------------------------- /salt/pillar/hiera.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Take in a hiera configuration file location and execute it. 3 | Adds the hiera data to pillar 4 | ''' 5 | 6 | # Import python libs 7 | import logging 8 | 9 | # Import salt libs 10 | import salt.utils 11 | from salt._compat import string_types 12 | 13 | # Import third party libs 14 | import yaml 15 | 16 | 17 | # Set up logging 18 | log = logging.getLogger(__name__) 19 | 20 | 21 | def __virtual__(): 22 | ''' 23 | Only return if hiera is installed 24 | ''' 25 | return 'hiera' if salt.utils.which('hiera') else False 26 | 27 | 28 | def ext_pillar(pillar, conf): 29 | ''' 30 | Execute hiera and return the data 31 | ''' 32 | cmd = 'hiera {0}'.format(conf) 33 | for key, val in __grains__.items(): 34 | if isinstance(val, string_types): 35 | cmd += ' {0}={1}'.format(key, val) 36 | try: 37 | data = yaml.safe_load(__salt__['cmd.run'](cmd)) 38 | except Exception: 39 | log.critical( 40 | 'Hiera yaml data failed to parse from conf {0}'.format(conf) 41 | ) 42 | return {} 43 | return data 44 | -------------------------------------------------------------------------------- /tests/integration/client/syndic.py: -------------------------------------------------------------------------------- 1 | # Import python libs 2 | import sys 3 | 4 | # Import salt libs 5 | from saltunittest import TestLoader, TextTestRunner 6 | import integration 7 | from integration import TestDaemon 8 | 9 | 10 | class TestSyndic(integration.SyndicCase): 11 | ''' 12 | Validate the syndic interface by testing the test module 13 | ''' 14 | def test_ping(self): 15 | ''' 16 | test.ping 17 | ''' 18 | self.assertTrue(self.run_function('test.ping')) 19 | 20 | def test_fib(self): 21 | ''' 22 | test.fib 23 | ''' 24 | self.assertEqual( 25 | self.run_function( 26 | 'test.fib', 27 | ['40'], 28 | )[0][-1], 29 | 34 30 | ) 31 | 32 | if __name__ == "__main__": 33 | loader = TestLoader() 34 | tests = loader.loadTestsFromTestCase(TestSyndic) 35 | print('Setting up Salt daemons to execute tests') 36 | with TestDaemon(): 37 | runner = TextTestRunner(verbosity=1).run(tests) 38 | sys.exit(runner.wasSuccessful()) 39 | -------------------------------------------------------------------------------- /salt/wheel/key.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Wheel system wrapper for key system 3 | ''' 4 | 5 | # Import salt libs 6 | import salt.key 7 | 8 | 9 | def list_all(): 10 | ''' 11 | List the keys under a named status 12 | ''' 13 | skey = salt.key.Key(__opts__) 14 | return skey.all_keys() 15 | 16 | def accept(match): 17 | ''' 18 | Accept keys based on a glob match 19 | ''' 20 | skey = salt.key.Key(__opts__) 21 | return skey.accept(match) 22 | 23 | def delete(match): 24 | ''' 25 | Delete keys based on a glob match 26 | ''' 27 | skey = salt.key.Key(__opts__) 28 | return skey.delete_key(match) 29 | 30 | def reject(match): 31 | ''' 32 | Delete keys based on a glob match 33 | ''' 34 | skey = salt.key.Key(__opts__) 35 | return skey.reject(match) 36 | 37 | def key_str(match): 38 | ''' 39 | Return the key strings 40 | ''' 41 | skey = salt.key.Key(__opts__) 42 | return skey.key_str(match) 43 | 44 | def finger(match): 45 | ''' 46 | Return the matching key fingerprints 47 | ''' 48 | skey = salt.key.Key(__opts__) 49 | return skey.finger(match) 50 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | 3 | python: 4 | - '2.6' 5 | - '2.7' 6 | 7 | before_install: 8 | - sudo apt-get update 9 | - sudo apt-get install --fix-broken --ignore-missing -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" swig supervisor rabbitmq-server ruby 10 | - (git describe && git fetch --tags) || (git remote add upstream git://github.com/saltstack/salt.git && git fetch --tags upstream) 11 | - pip install mock --use-mirrors --mirrors=http://testpypi.python.org/pypi 12 | - pip install http://dl.dropbox.com/u/174789/m2crypto-0.20.1.tar.gz 13 | - "if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install --use-mirrors --mirrors=http://testpypi.python.org/pypi unittest2 ordereddict; fi" 14 | 15 | install: pip install -r requirements.txt --use-mirrors --mirrors=http://testpypi.python.org/pypi 16 | 17 | script: "sudo -E /home/travis/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/python setup.py test --runtests-opts='--run-destructive --sysinfo -v'" 18 | 19 | notifications: 20 | irc: 21 | channels: "irc.freenode.org#salt-devel" 22 | on_success: change 23 | on_failure: change 24 | -------------------------------------------------------------------------------- /doc/topics/tests/index.rst: -------------------------------------------------------------------------------- 1 | ============= 2 | Writing Tests 3 | ============= 4 | 5 | Salt uses a test platform to verify functionality of components in a simple 6 | way. Two testing systems exist to enable testing salt functions in somewhat 7 | real environments. The two subsystems available are integration tests and 8 | unit tests. 9 | 10 | Salt uses the python standard library unittest2 system for testing. 11 | 12 | Integration Tests 13 | ================= 14 | 15 | The integration tests start up a number of salt daemons to test functionality 16 | in a live environment. These daemons include 2 salt masters, 1 syndic and 2 17 | minions. This allows for the syndic interface to be tested and master/minion 18 | communication to be verified. All of the integration tests are executed as 19 | live salt commands sent through the started daemons. 20 | 21 | * :doc:`Writing integration tests ` 22 | 23 | Integration tests are particularly good at testing modules, states and shell 24 | commands. 25 | 26 | Unit Tests 27 | ========== 28 | 29 | Direct unit tests are also available, these tests are good for internal 30 | functions. 31 | -------------------------------------------------------------------------------- /doc/ref/cli/salt-run.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | ``salt-run`` 3 | ============ 4 | 5 | Execute a Salt runner 6 | 7 | Synopsis 8 | ======== 9 | 10 | :: 11 | 12 | salt-run RUNNER 13 | 14 | Description 15 | =========== 16 | 17 | salt-run is the frontend command for executing ``Salt Runners``. 18 | Salt runners are simple modules used to execute convenience functions on the 19 | master 20 | 21 | Options 22 | ======= 23 | 24 | .. program:: salt-cp 25 | 26 | .. option:: -h, --help 27 | 28 | Print a usage message briefly summarizing these command-line options 29 | 30 | .. option:: --version 31 | 32 | Show program's version number and exit 33 | 34 | .. option:: --versions-report 35 | 36 | Show program's dependencies version number and exit 37 | 38 | .. option:: -c CONFIG_DIR, --config-dir=CONFIG_dir 39 | 40 | The location of the Salt configuration directory, this directory contains 41 | the configuration files for Salt master and minions. The default location 42 | on most systems is /etc/salt. 43 | 44 | See also 45 | ======== 46 | 47 | :manpage:`salt(1)` 48 | :manpage:`salt-master(1)` 49 | :manpage:`salt-minion(1)` 50 | -------------------------------------------------------------------------------- /salt/renderers/py.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Pure python state renderer 3 | 4 | The sls file should contain a function called ``run`` which returns high state 5 | data 6 | ''' 7 | 8 | # Import python libs 9 | import os 10 | 11 | # Import salt libs 12 | from salt.exceptions import SaltRenderError 13 | import salt.utils.templates 14 | 15 | 16 | def render(template, env='', sls='', tmplpath=None, **kws): 17 | ''' 18 | Render the python module's components 19 | 20 | :rtype: string 21 | ''' 22 | template = tmplpath 23 | if not os.path.isfile(template): 24 | raise SaltRenderError('Template {0} is not a file!'.format(template)) 25 | 26 | tmp_data = salt.utils.templates.py( 27 | template, 28 | True, 29 | salt=__salt__, 30 | grains=__grains__, 31 | opts=__opts__, 32 | pillar=__pillar__, 33 | env=env, 34 | sls=sls, 35 | **kws) 36 | if not tmp_data.get('result', False): 37 | raise SaltRenderError(tmp_data.get('data', 38 | 'Unknown render error in py renderer')) 39 | 40 | return tmp_data['data'] 41 | -------------------------------------------------------------------------------- /salt/modules/win_shadow.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Manage the shadow file 3 | ''' 4 | 5 | import salt.utils 6 | 7 | 8 | def __virtual__(): 9 | ''' 10 | Only works on Windows systems 11 | ''' 12 | if salt.utils.is_windows(): 13 | return 'shadow' 14 | return False 15 | 16 | 17 | def info(name): 18 | ''' 19 | Return information for the specified user 20 | This is just returns dummy data so that salt states can work. 21 | 22 | CLI Example:: 23 | 24 | salt '*' shadow.info root 25 | ''' 26 | ret = { 27 | 'name': name, 28 | 'pwd': '', 29 | 'lstchg': '', 30 | 'min': '', 31 | 'max': '', 32 | 'warn': '', 33 | 'inact': '', 34 | 'expire': ''} 35 | return ret 36 | 37 | 38 | def set_password(name, password): 39 | ''' 40 | Set the password for a named user. 41 | 42 | CLI Example:: 43 | 44 | salt '*' shadow.set_password root mysecretpassword 45 | ''' 46 | cmd = 'net user {0} {1}'.format(name, password) 47 | ret = __salt__['cmd.run_all'](cmd) 48 | 49 | return not ret['retcode'] 50 | -------------------------------------------------------------------------------- /doc/topics/projects/index.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | Salt Based Projects 3 | =================== 4 | 5 | A number of unofficial open source projects, based on Salt, or written to 6 | enhance Salt have been created. 7 | 8 | Salt Sandbox 9 | ============ 10 | 11 | Created by Aaron Bull Schaefer, aka "elasticdog". 12 | 13 | https://github.com/elasticdog/salt-sandbox 14 | 15 | Salt Sandbox is a multi-VM Vagrant-based Salt development environment used 16 | for creating and testing new Salt state modules outside of your production 17 | environment. It's also a great way to learn firsthand about Salt and its 18 | remote execution capabilities. 19 | 20 | Salt Sandbox will set up three separate virtual machines: 21 | 22 | - salt.example.com - the Salt master server 23 | - minion1.example.com - the first Salt minion machine 24 | - minion2.example.com - the second Salt minion machine 25 | 26 | These VMs can be used in conjunction to segregate and test your modules based 27 | on node groups, top file environments, grain values, etc. You can even test 28 | modules on different Linux distributions or release versions to better match 29 | your production infrastructure. 30 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-light-italic.css: -------------------------------------------------------------------------------- 1 | /* 2 | Font: Nexa Light Italic 3 | Style: Italic 4 | URL: http://www.youworkforthem.com/product.php?sku=T3972 5 | Foundry: Fontfabric 6 | Foundry: http://www.youworkforthem.com/designer/105/fontfabric 7 | Copyright: Copyright (c) 2012 by Svetoslav Simov. All rights reserved. 8 | Version: 1.1 9 | Created: October 11, 2012 10 | License: http://www.youworkforthem.com/font-license 11 | License: The WebFont(s) listed in this document must follow the YouWorkForThem 12 | WebFont license rules. All other parties are strictly restricted 13 | from using the WebFonts(s) listed without a purchased license. 14 | All details above must always remain unaltered and visible in your CSS. 15 | */ 16 | 17 | @font-face { 18 | font-family: 'Nexa Light Italic'; 19 | src: url('nexa-light-italic.eot'); 20 | src: url('nexa-light-italic.eot?#iefix') format('embedded-opentype'), 21 | url('nexa-light-italic.woff') format('woff'), 22 | url('nexa-light-italic.ttf') format('truetype'), 23 | url('nexa-light-italic.svg#ywftsvg') format('svg'); 24 | font-weight: normal; 25 | font-style: normal; 26 | } 27 | -------------------------------------------------------------------------------- /doc/_themes/saltstack/static/fonts/nexa-xbold-italic.css: -------------------------------------------------------------------------------- 1 | /* 2 | Font: Nexa XBold Italic 3 | Style: Regular 4 | URL: http://www.youworkforthem.com/product.php?sku=T3972 5 | Foundry: Fontfabric 6 | Foundry: http://www.youworkforthem.com/designer/105/fontfabric 7 | Copyright: Copyright (c) 2012 by Svetoslav Simov. All rights reserved. 8 | Version: 1.1 9 | Created: October 11, 2012 10 | License: http://www.youworkforthem.com/font-license 11 | License: The WebFont(s) listed in this document must follow the YouWorkForThem 12 | WebFont license rules. All other parties are strictly restricted 13 | from using the WebFonts(s) listed without a purchased license. 14 | All details above must always remain unaltered and visible in your CSS. 15 | */ 16 | 17 | @font-face { 18 | font-family: 'Nexa XBold Italic'; 19 | src: url('nexa-xbold-italic.eot'); 20 | src: url('nexa-xbold-italic.eot?#iefix') format('embedded-opentype'), 21 | url('nexa-xbold-italic.woff') format('woff'), 22 | url('nexa-xbold-italic.ttf') format('truetype'), 23 | url('nexa-xbold-italic.svg#ywftsvg') format('svg'); 24 | font-weight: normal; 25 | font-style: normal; 26 | } 27 | -------------------------------------------------------------------------------- /tests/unit/modules/file_test.py: -------------------------------------------------------------------------------- 1 | import tempfile 2 | 3 | from saltunittest import TestCase, TestLoader, TextTestRunner 4 | 5 | from salt import config as sconfig 6 | from salt.modules import file as filemod 7 | from salt.modules import cmdmod 8 | 9 | filemod.__salt__ = { 10 | 'cmd.run': cmdmod.run, 11 | } 12 | 13 | SED_CONTENT = """test 14 | some 15 | content 16 | /var/lib/foo/app/test 17 | here 18 | """ 19 | 20 | 21 | class FileModuleTestCase(TestCase): 22 | def test_sed_limit_escaped(self): 23 | with tempfile.NamedTemporaryFile() as tfile: 24 | tfile.write(SED_CONTENT) 25 | tfile.seek(0, 0) 26 | 27 | path = tfile.name 28 | before = '/var/lib/foo' 29 | after = '' 30 | limit = '^{0}'.format(before) 31 | 32 | filemod.sed(path, before, after, limit=limit) 33 | 34 | with open(path, 'rb') as newfile: 35 | self.assertEquals(SED_CONTENT.replace(before, ''), newfile.read()) 36 | 37 | 38 | if __name__ == "__main__": 39 | loader = TestLoader() 40 | tests = loader.loadTestsFromTestCase(FileModuleTestCase) 41 | TextTestRunner(verbosity=1).run(tests) 42 | -------------------------------------------------------------------------------- /salt/auth/keystone.py: -------------------------------------------------------------------------------- 1 | '''Salt Keystone Authentication 2 | Module to provide authentication using keystone as the backend. 3 | 4 | Required python modules: keystoneclient 5 | ''' 6 | try: 7 | from keystoneclient.v2_0 import client 8 | from keystoneclient.exceptions import AuthorizationFailure, Unauthorized 9 | except ImportError: 10 | pass 11 | 12 | 13 | def get_auth_url(): 14 | ''' 15 | Try and get the url from the config, else return localhost 16 | ''' 17 | try: 18 | return __opts__['keystone.auth_url'] 19 | except KeyError: 20 | return 'http://localhost:35357/v2.0' 21 | 22 | 23 | def auth(username, password): 24 | ''' 25 | Try and authenticate 26 | ''' 27 | try: 28 | keystone = client.Client(username=username, password=password, 29 | auth_url=get_auth_url()) 30 | except (AuthorizationFailure, Unauthorized): 31 | return False 32 | else: 33 | return keystone.authenticate() 34 | 35 | if __name__ == '__main__': 36 | __opts__ = {} 37 | if auth('test', 'test'): 38 | print "Authenticated" 39 | else: 40 | print "Failed to authenticate" 41 | -------------------------------------------------------------------------------- /doc/ref/states/testing.rst: -------------------------------------------------------------------------------- 1 | ============= 2 | State Testing 3 | ============= 4 | 5 | Executing a Salt state run can potentially change many aspects of a system and 6 | it may be desirable to first see what a state run is going to change before 7 | applying the run. 8 | 9 | Salt has a test interface to report on exactly what will be changed, this 10 | interface can be invoked on any of the major state run functions: 11 | 12 | .. code-block:: bash 13 | 14 | # salt \* state.highstate test=True 15 | # salt \* state.sls test=True 16 | # salt \* state.single test=True 17 | 18 | The test run is mandated by adding the ``test=True`` option to the states. The 19 | return information will show states that will be applied in yellow and the 20 | result is reported as `None`. 21 | 22 | Default Test 23 | ============ 24 | 25 | If the value `test` is set to True in the minion configuration file then states 26 | will default to being executed in test mode. If this value is set then states 27 | can still be run by calling test=False: 28 | 29 | .. code-block:: bash 30 | 31 | # salt \* state.highstate test=False 32 | # salt \* state.sls test=False 33 | # salt \* state.single test=False 34 | -------------------------------------------------------------------------------- /salt/runners/launchd.py: -------------------------------------------------------------------------------- 1 | # Import python libs 2 | import os 3 | import sys 4 | 5 | 6 | def write_launchd_plist(program): 7 | ''' 8 | Write a launchd plist for managing salt-master or salt-minion 9 | ''' 10 | plist_sample_text=""" 11 | 12 | 13 | 14 | 15 | Label 16 | org.saltstack.{program} 17 | 18 | ProgramArguments 19 | 20 | {python} 21 | {script} 22 | 23 | 24 | RunAtLoad 25 | 26 | 27 | 28 | """.strip() 29 | 30 | supported_programs = ['salt-master', 'salt-minion'] 31 | 32 | if program not in supported_programs: 33 | sys.stderr.write("Supported programs: %r\n" % supported_programs) 34 | sys.exit(-1) 35 | 36 | sys.stdout.write( 37 | plist_sample_text.format( 38 | program=program, 39 | python=sys.executable, 40 | script=os.path.join(os.path.dirname(sys.executable), program) 41 | ) 42 | ) 43 | -------------------------------------------------------------------------------- /salt/modules/qemu_img.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Qemu-img Command Wrapper 3 | ======================== 4 | 5 | The qemu img command is wrapped for specific functions 6 | 7 | :depends: qemu-img 8 | ''' 9 | 10 | # Import python libs 11 | import os 12 | 13 | # Import salt libs 14 | import salt.utils 15 | 16 | def __virtual__(): 17 | ''' 18 | Only load if qemu-img is installed 19 | ''' 20 | if salt.utils.which('qemu-img'): 21 | return 'qemu_img' 22 | return False 23 | 24 | 25 | def make_image(location, size, fmt): 26 | ''' 27 | Create a blank virtual machine image file of the specified size in 28 | megabytes. The image can be created in any format supported by qemu 29 | 30 | CLI Example:: 31 | 32 | salt '*' qemu_img.make_image /tmp/image.qcow 2048 qcow2 33 | salt '*' qemu_img.make_image /tmp/image.raw 10240 raw 34 | ''' 35 | if not os.path.isabs(location): 36 | return '' 37 | if not os.path.isdir(os.path.dirname(location)): 38 | return '' 39 | if not __salt__['cmd.retcode']( 40 | 'qemu-img create -f {0} {1} {2}M'.format( 41 | fmt, 42 | location, 43 | size)): 44 | return location 45 | return '' 46 | -------------------------------------------------------------------------------- /tests/unit/utils/filebuffer_test.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' 3 | tests.unit.utils.filebuffer_test 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 | 6 | :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` 7 | :copyright: © 2012 by the SaltStack Team, see AUTHORS for more details. 8 | :license: Apache 2.0, see LICENSE for more details. 9 | ''' 10 | 11 | # Import salt libs 12 | from saltunittest import TestCase, TestLoader, TextTestRunner 13 | from salt.utils.filebuffer import BufferedReader, InvalidFileMode 14 | 15 | 16 | class TestFileBuffer(TestCase): 17 | def test_read_only_mode(self): 18 | with self.assertRaises(InvalidFileMode): 19 | BufferedReader('/tmp/foo', mode='a') 20 | 21 | with self.assertRaises(InvalidFileMode): 22 | BufferedReader('/tmp/foo', mode='ab') 23 | 24 | with self.assertRaises(InvalidFileMode): 25 | BufferedReader('/tmp/foo', mode='w') 26 | 27 | with self.assertRaises(InvalidFileMode): 28 | BufferedReader('/tmp/foo', mode='wb') 29 | 30 | 31 | if __name__ == "__main__": 32 | loader = TestLoader() 33 | tests = loader.loadTestsFromTestCase(TestFileBuffer) 34 | TextTestRunner(verbosity=1).run(tests) 35 | -------------------------------------------------------------------------------- /doc/ref/states/startup.rst: -------------------------------------------------------------------------------- 1 | ============== 2 | Startup States 3 | ============== 4 | 5 | Sometimes it may be desired that the salt minion execute a state run when it is 6 | started. This alleviates the need for the master to initiate a state run on a 7 | new minion and can make provisioning much easier. 8 | 9 | As of Salt 0.10.3 the minion config reads options that allow for states to be 10 | executed at startup. The options are `startup_states`, `sls_list` and 11 | `top_file`. 12 | 13 | The `startup_states` option can be passed one of a number of arguments to 14 | define how to execute states. The available options are: 15 | 16 | highstate 17 | Execute ``state.highstate`` 18 | 19 | sls 20 | Read in the ``sls_list`` option and execute the named sls files 21 | 22 | top 23 | Read in the ``top_file`` option and execute states based on that top file 24 | on the Salt Master 25 | 26 | Examples: 27 | --------- 28 | 29 | Execute ``state.highstate`` when starting the minion: 30 | 31 | 32 | .. code-block:: yaml 33 | 34 | startup_states: highstate 35 | 36 | Execute the sls files `edit.vim` and `hyper`: 37 | 38 | .. code-block:: yaml 39 | 40 | startup_states: sls 41 | 42 | sls_list: 43 | - edit.vim 44 | - hyper 45 | -------------------------------------------------------------------------------- /tests/integration/states/rabbitmq_vhost.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Tests for the rabbitmq state 3 | ''' 4 | import os 5 | import integration 6 | 7 | 8 | class RabbitVHostTestCase(integration.ModuleCase, 9 | integration.SaltReturnAssertsMixIn): 10 | ''' 11 | Validate the rabbitmq virtual host states. 12 | ''' 13 | def setUp(self): 14 | super(RabbitVHostTestCase, self).setUp() 15 | rabbit_installed = self.run_function('cmd.has_exec', ['rabbitmqctl']) 16 | 17 | if not rabbit_installed: 18 | self.skipTest('rabbitmq-server not installed') 19 | if os.geteuid() != 0: 20 | self.skipTest('You must be root to run this test') 21 | 22 | def test_present(self): 23 | ''' 24 | rabbitmq_vhost.present null_host 25 | ''' 26 | ret = self.run_state( 27 | 'rabbitmq_vhost.present', name='null_host', test=True 28 | ) 29 | self.assertSaltFalseReturn(ret) 30 | 31 | def absent(self): 32 | ''' 33 | rabbitmq_vhost.absent null_host 34 | ''' 35 | ret = self.run_state( 36 | 'rabbitmq_vhost.absent', name='null_host', test=True 37 | ) 38 | self.assertSaltFalseReturn(ret) 39 | -------------------------------------------------------------------------------- /tests/integration/states/host.py: -------------------------------------------------------------------------------- 1 | ''' 2 | tests for host state 3 | ''' 4 | 5 | # Import python libs 6 | import os 7 | import shutil 8 | 9 | # Import salt libs 10 | import salt.utils 11 | import integration 12 | 13 | HFILE = os.path.join(integration.TMP, 'hosts') 14 | 15 | 16 | class HostTest(integration.ModuleCase, integration.SaltReturnAssertsMixIn): 17 | ''' 18 | Validate the host state 19 | ''' 20 | 21 | def setUp(self): 22 | shutil.copyfile(os.path.join(integration.FILES, 'hosts'), HFILE) 23 | super(HostTest, self).setUp() 24 | 25 | def tearDown(self): 26 | if os.path.exists(HFILE): 27 | os.remove(HFILE) 28 | super(HostTest, self).tearDown() 29 | 30 | def test_present(self): 31 | ''' 32 | host.present 33 | ''' 34 | name = 'spam.bacon' 35 | ip = '10.10.10.10' 36 | ret = self.run_state('host.present', name=name, ip=ip) 37 | self.assertSaltTrueReturn(ret) 38 | with salt.utils.fopen(HFILE) as fp_: 39 | output = fp_.read() 40 | self.assertIn('{0}\t\t{1}'.format(ip, name), output) 41 | 42 | 43 | if __name__ == '__main__': 44 | from integration import run_tests 45 | run_tests(HostTest) 46 | --------------------------------------------------------------------------------