本文共 27453 字,大约阅读时间需要 91 分钟。
精确匹配
# salt 'haproxy' test.pinghaproxy: True
通配符匹配
# salt 'ha*' test.pinghaproxy: True
运行模块,目录如下
# find /srv/salt/php/srv/salt/php/srv/salt/php/init.sls/srv/salt/php/php-fpm.sls/srv/salt/php/cli.sls
php 目录下含多个sls文件
salt 'centos*' state.sls php.clisalt 'centos*' state.sls php.php-fpm
salt '*' cmd.run 'ls -l /etc'
salt '*' cmd.script salt://iptables.sh
salt '*' pkg.install vim
salt '*' network.interfaces
例 159.1. salt command
# salt '*' sys.doc | grep "salt '*'"salt '*' acl.delfacl user myuser /tmp/house/kitchensalt '*' acl.delfacl default:group mygroup /tmp/house/kitchensalt '*' acl.delfacl d:u myuser /tmp/house/kitchensalt '*' acl.delfacl g myuser /tmp/house/kitchen /tmp/house/livingroomsalt '*' acl.getfacl /tmp/house/kitchensalt '*' acl.getfacl /tmp/house/kitchen /tmp/house/livingroomsalt '*' acl.addfacl user myuser rwx /tmp/house/kitchensalt '*' acl.addfacl default:group mygroup rx /tmp/house/kitchensalt '*' acl.addfacl d:u myuser 7 /tmp/house/kitchensalt '*' acl.addfacl g mygroup 0 /tmp/house/kitchen /tmp/house/livingroomsalt '*' acl.versionsalt '*' acl.wipefacls /tmp/house/kitchensalt '*' acl.wipefacls /tmp/house/kitchen /tmp/house/livingroomsalt '*' aliases.get_targetsalt '*' aliases.has_target salt '*' aliases.list_aliasessalt '*' aliases.rm_alias salt '*' aliases.set_target salt '*' alternatives.check_installed name pathsalt '*' alternatives.display salt '*' alternatives.install name link path prioritysalt '*' alternatives.remove name pathsalt '*' alternatives.show_current emacssalt '*' archive.gunzip /tmp/sourcefile.txt.gzsalt '*' archive.gunzip template=jinja /tmp/{ {grains.id}}.txt.gzsalt '*' archive.gzip /tmp/sourcefile.txtsalt '*' archive.gzip template=jinja /tmp/{ {grains.id}}.txtsalt '*' archive.rar /tmp/rarfile.rar /tmp/sourcefile1 /tmp/sourcefile2salt '*' archive.rar template=jinja /tmp/rarfile.rar /tmp/sourcefile1 /tmp/{ {grains.id}}.txtsalt '*' archive.tar cjvf /tmp/tarfile.tar.bz2 /tmp/file_1 /tmp/file_2salt '*' archive.tar template=jinja cjvf /tmp/salt.tar.bz2 { {grains.saltpath}}salt '*' archive.unrar /tmp/rarfile.rar /home/strongbad/ file_1 file_2salt '*' archive.unrar template=jinja /tmp/rarfile.rar /tmp/{ {grains.id}}/ file_1 file_2salt '*' archive.unzip /tmp/zipfile.zip /home/strongbad/ file_1 file_2salt '*' archive.unzip template=jinja /tmp/zipfile.zip /tmp/{ {grains.id}}/ file_1 file_2salt '*' archive.zip /tmp/zipfile.zip /tmp/sourcefile1 /tmp/sourcefile2salt '*' archive.zip template=jinja /tmp/zipfile.zip /tmp/sourcefile1 /tmp/{ {grains.id}}.txtsalt '*' cmd.exec_code ruby 'puts "cheese"'salt '*' cmd.has_exec catsalt '*' cmd.retcode "file /bin/bash"salt '*' cmd.retcode template=jinja "file { {grains.pythonpath[0]}}/python"salt '*' cmd.retcode "grep f" stdin='one\ntwo\nthree\nfour\nfive\n'salt '*' cmd.run "ls -l | awk '/foo/{print \$2}'"salt '*' cmd.run template=jinja "ls -l /tmp/{ {grains.id}} | awk '/foo/{print \$2}'"salt '*' cmd.run "Get-ChildItem C:\ " shell='powershell'salt '*' cmd.run "grep f" stdin='one\ntwo\nthree\nfour\nfive\n'salt '*' cmd.run_all "ls -l | awk '/foo/{print \$2}'"salt '*' cmd.run_all template=jinja "ls -l /tmp/{ {grains.id}} | awk '/foo/{print \$2}'"salt '*' cmd.run_all "grep f" stdin='one\ntwo\nthree\nfour\nfive\n'salt '*' cmd.run_stderr "ls -l | awk '/foo/{print \$2}'"salt '*' cmd.run_stderr template=jinja "ls -l /tmp/{ {grains.id}} | awk '/foo/{print \$2}'"salt '*' cmd.run_stderr "grep f" stdin='one\ntwo\nthree\nfour\nfive\n'salt '*' cmd.run_stdout "ls -l | awk '/foo/{print \$2}'"salt '*' cmd.run_stdout template=jinja "ls -l /tmp/{ {grains.id}} | awk '/foo/{print \$2}'"salt '*' cmd.run_stdout "grep f" stdin='one\ntwo\nthree\nfour\nfive\n'salt '*' cmd.script salt://scripts/runme.shsalt '*' cmd.script salt://scripts/runme.sh 'arg1 arg2 "arg 3"'salt '*' cmd.script salt://scripts/windows_task.ps1 args=' -Input c:\tmp\infile.txt' shell='powershell'salt '*' cmd.script salt://scripts/runme.sh stdin='one\ntwo\nthree\nfour\nfive\n'salt '*' cmd.script_retcode salt://scripts/runme.shsalt '*' cmd.script_retcode salt://scripts/runme.sh stdin='one\ntwo\nthree\nfour\nfive\n'salt '*' cmd.which catsalt '*' cmd.which_bin '[pip2, pip, pip-python]'salt '*' config.backup_modesalt '*' config.dot_vals hostsalt '*' qemu.gather_bootstrap_script Truesalt '*' config.get pkg:apachesalt '*' config.manage_modesalt '*' config.option redis.hostsalt '*' config.valid_fileproto salt://path/to/filesalt '*' cp.cache_dir salt://path/to/dirsalt '*' cp.cache_file salt://path/to/filesalt '*' cp.cache_files salt://pathto/file1,salt://pathto/file1salt '*' cp.cache_local_file /etc/hostssalt '*' cp.cache_mastersalt '*' cp.get_dir salt://path/to/dir/ /minion/destsalt '*' cp.get_file salt://path/to/file /minion/destsalt '*' cp.get_file "salt://{ {grains.os}}/vimrc" /etc/vimrc template=jinjasalt '*' cp.get_file_str salt://my/filesalt '*' cp.get_template salt://path/to/template /minion/destsalt '*' cp.get_url salt://my/file /tmp/minesalt '*' cp.get_url http://www.slashdot.org /tmp/index.htmlsalt '*' cp.hash_file salt://path/to/filesalt '*' cp.is_cached salt://path/to/filesalt '*' cp.list_mastersalt '*' cp.list_master_dirssalt '*' cp.list_minionsalt '*' cp.list_statessalt '*' cp.push /etc/fstabsalt '*' cron.list_tab rootsalt '*' cron.list_tab rootsalt '*' cron.raw_cron rootsalt '*' cron.rm_job root /usr/local/weeklysalt '*' cron.rm_job root /usr/bin/foo dayweek=1salt '*' cron.rm_env root MAILTOsalt '*' cron.rm_job root /usr/local/weeklysalt '*' cron.rm_job root /usr/bin/foo dayweek=1salt '*' cron.set_env root MAILTO user@example.comsalt '*' cron.set_job root '*' '*' '*' '*' 1 /usr/local/weeklysalt '*' cron.set_special @hourly 'echo foobar'salt '*' cron.write_cron_file root /tmp/new_cronsalt '*' cron.write_cron_file_verbose root /tmp/new_cronsalt '*' daemontools.full_restart salt '*' daemontools.get_allsalt '*' daemontools.reload salt '*' daemontools.restart salt '*' daemontools.start salt '*' daemontools.status salt '*' daemontools.stop salt '*' daemontools.term salt '*' data.cas salt '*' data.clearsalt '*' data.dump '{'eggs': 'spam'}'salt '*' data.getval salt '*' data.getvals [ ...]salt '*' data.loadsalt '*' data.update salt '*' disk.inodeusagesalt '*' disk.usagesalt '*' django.collectstatic salt '*' django.command salt '*' django.createsuperuser user user@example.comsalt '*' django.loaddata salt '*' django.syncdb salt '*' dnsmasq.versionsalt '*' dnsmasq.get_configsalt '*' dnsmasq.get_config file=/etc/dnsmasq.confsalt '*' dnsmasq.set_config domain=mydomain.comsalt '*' dnsmasq.set_config follow=False domain=mydomain.comsalt '*' dnsmasq.set_config file=/etc/dnsmasq.conf domain=mydomain.comsalt '*' dnsmasq.versionsalt '*' dnsutil.hosts_append /etc/hosts 127.0.0.1 ad1.yuk.co,ad2.yuk.cosalt '*' dnsutil.hosts_delete /etc/hosts ad1.yuk.cosalt '*' dnsutil.hosts_delete /etc/hosts ad2.yuk.co,ad1.yuk.cosalt '*' dnsutil.parse_hostssalt '*' event.fire 'stuff to be in the event' 'tag'salt '*' event.fire_master 'stuff to be in the event' 'tag'salt '*' extfs.attributes /dev/sda1salt '*' extfs.blocks /dev/sda1salt '*' extfs.dump /dev/sda1salt '*' extfs.mkfs /dev/sda1 fs_type=ext4 opts='acl,noexec'salt '*' extfs.tune /dev/sda1 force=True label=wildstallyns opts='acl,noexec'salt '*' file.append /etc/motd \salt '*' file.check_file_meta /etc/httpd/conf.d/httpd.conf salt://http/httpd.conf '{hash_type: 'md5', 'hsum': }' root, root, '755' basesalt '*' file.check_hash /etc/fstab md5= salt '*' file.check_managed /etc/httpd/conf.d/httpd.conf salt://http/httpd.conf '{hash_type: 'md5', 'hsum': }' root, root, '755' jinja True None None basesalt '*' file.check_perms /etc/sudoers '{}' root root 400salt '*' file.chgrp /etc/passwd rootsalt '*' file.chown /etc/passwd root rootsalt '*' file.comment /etc/modules pcspkrsalt '*' file.contains /etc/crontab 'mymaintenance.sh'salt '*' file.contains_glob /etc/foobar '*cheese*'salt '*' file.contains_regex /etc/crontabsalt '*' file.contains_regex_multiline /etc/crontab '^maint'salt '*' file.directory_exists /etcsalt '*' file.file_exists /etc/passwdsalt '*' file.find / type=f name=\*.bak size=+10msalt '*' file.find /var mtime=+30d size=+10m print=path,size,mtimesalt '*' file.find /var/log name=\*.[0-9] mtime=+30d size=+10m deletesalt '*' file.get_diff /home/fred/.vimrc salt://users/fred/.vimrcsalt '*' file.get_gid /etc/passwdsalt '*' file.get_group /etc/passwdsalt '*' file.get_hash /etc/shadowsalt '*' file.get_managed /etc/httpd/conf.d/httpd.conf jinja salt://http/httpd.conf '{hash_type: 'md5', 'hsum': }' root root '755' base None Nonesalt '*' file.get_mode /etc/passwdsalt '*' file.get_selinux_context /etc/hostssalt '*' file.get_sum /etc/passwd sha512salt '*' file.get_uid /etc/passwdsalt '*' file.get_user /etc/passwdsalt '*' file.gid_to_group 0salt '*' file.group_to_gid rootsalt '*' file.makedirs /opt/codesalt '*' file.makedirs_perms /opt/codesalt '*' file.manage_file /etc/httpd/conf.d/httpd.conf '{}' salt://http/httpd.conf '{hash_type: 'md5', 'hsum': }' root root '755' base ''salt '*' file.mkdir /opt/jetty/contextsalt '*' file.patch /opt/file.txt /tmp/file.txt.patchsalt '*' file.sed /etc/httpd/httpd.conf 'LogLevel warn' 'LogLevel info'salt '*' file.remove /tmp/foosalt '*' file.rename /path/to/src /path/to/dstsalt '*' file.restorecon /home/user/.ssh/authorized_keyssalt '*' file.sed /etc/httpd/httpd.conf 'LogLevel warn' 'LogLevel info'salt '*' file.contains /etc/crontab 'mymaintenance.sh'salt '*' file.set_mode /etc/passwd 0644salt '*' file.set_selinux_context path salt '*' file.source_list salt://http/httpd.conf '{hash_type: 'md5', 'hsum': }' basesalt '*' file.stats /etc/passwdsalt '*' file.symlink /path/to/file /path/to/linksalt '*' file.touch /var/log/emptyfilesalt '*' file.uid_to_user 0salt '*' file.uncomment /etc/hosts.deny 'ALL: PARANOID'salt '*' file.user_to_uid rootsalt '*' gem.install vagrantsalt '*' gem.sources_add http://rubygems.org/salt '*' gem.sources_listsalt '*' gem.sources_remove http://rubygems.org/salt '*' gem.uninstall vagrantsalt '*' gem.update vagrantsalt '*' gem.update_systemsalt '*' git.add /path/to/git/repo /path/to/filesalt '*' git.archive /path/to/repo /path/to/archive.tar.gzsalt '*' git.checkout /path/to/repo somebranch user=jeffsalt '*' git.checkout /path/to/repo opts='testbranch -- conf/file1 file2'salt '*' git.checkout /path/to/repo rev=origin/mybranch opts=--tracksalt '*' git.clone /path/to/repo git://github.com/saltstack/salt.gitsalt '*' git.clone /path/to/repo.git\salt '*' git.commit /path/to/git/repo 'The commit message'salt '*' git.config_get /path/to/repo user.emailsalt '*' git.config_set /path/to/repo user.email me@example.comsalt '*' git.describe /path/to/reposalt '*' git.describe /path/to/repo developsalt '*' git.fetch /path/to/repo '--all'salt '*' git.fetch cwd=/path/to/repo opts='--all' user=johnnysalt '*' git.init /path/to/repo.git opts='--bare'salt '*' git.fetch /path/to/reposalt '*' git.merge /path/to/repo @{upstream}salt '*' git.pull /path/to/repo opts='--rebase origin master'salt '*' git.push /path/to/git/repo remote-namesalt '*' git.rebase /path/to/repo mastersalt '*' git.rebase /path/to/repo 'origin master'salt '*' git.remote_get /path/to/reposalt '*' git.remote_get /path/to/repo upstreamsalt '*' git.remote_set /path/to/repo remote_url=git@github.com:saltstack/salt.gitsalt '*' git.remote_set /path/to/repo origin git@github.com:saltstack/salt.gitsalt '*' git.remotes /path/to/reposalt '*' git.reset /path/to/repo mastersalt '*' git.revision /path/to/repo mybranchsalt '*' git.rm /path/to/git/repo /path/to/filesalt '*' git.stash /path/to/repo mastersalt '*' git.status /path/to/git/reposalt '*' git.submodule /path/to/repo.git/sub/reposalt '*' grains.get pkg:apachesalt '*' grains.item ossalt '*' grains.item os osrelease oscodenamesalt '*' grains.item host sanitize=Truesalt '*' grains.itemssalt '*' grains.items sanitize=Truesalt '*' grains.lssalt '*' grains.setval key valsalt '*' group.add foo 3456salt '*' group.chgid foo 4376salt '*' group.delete foosalt '*' group.getentsalt '*' group.info foosalt '*' grub.confsalt '*' grub.versionsalt '*' hg.archive /path/to/repo output=/tmp/archive.tgz fmt=tgzsalt '*' hg.clone /path/to/repo https://bitbucket.org/birkenfeld/sphinxsalt '*' hg.describe /path/to/reposalt '*' hg.pull /path/to/repo '-u'salt '*' hg.revision /path/to/repo mybranchsalt '*' hosts.add_host salt '*' hosts.get_alias salt '*' hosts.get_ip salt '*' hosts.has_pair salt '*' hosts.list_hostssalt '*' hosts.rm_host salt '*' hosts.set_host salt '*' qemu_nbd.bootstrap /srv/salt-images/host.qcow 4096 qcow2salt '*' img.mount_image /tmp/foosalt '*' img.seed /tmp/image.qcow2salt '*' img.umount_image /mnt/foosalt '*' ip.apply_network_settingssalt '*' ip.build_bond bond0 mode=balance-albsalt '*' ip.build_interface eth0 eth salt '*' ip.build_network_settings salt '*' ip.build_routes eth0 salt '*' ip.down eth0salt '*' ip.get_bond bond0salt '*' ip.get_interface eth0salt '*' ip.get_network_settingssalt '*' ip.get_routes eth0salt '*' ip.up eth0salt '*' iptables.append filter INPUT rule='-m state --state RELATED,ESTABLISHED -j ACCEPT'salt '*' iptables.delete filter INPUT position=3salt '*' iptables.delete filter INPUT rule='-m state --state RELATED,ESTABLISHED -j ACCEPT'salt '*' iptables.flush filtersalt '*' iptables.get_policy filter INPUTsalt '*' iptables.get_rulessalt '*' iptables.get_saved_policy filter INPUTsalt '*' iptables.get_saved_policy filter INPUT conf_file=/etc/iptables.savedsalt '*' iptables.get_saved_rulessalt '*' iptables.insert filter INPUT position=3 rule='-m state --state RELATED,ESTABLISHED -j ACCEPT'salt '*' iptables.save /etc/sysconfig/iptablessalt '*' iptables.set_policy filter INPUT ACCEPTsalt '*' iptables.versionsalt '*' key.fingersalt '*' keyboard.get_syssalt '*' keyboard.get_xsalt '*' keyboard.set_sys dvoraksalt '*' keyboard.set_x dvoraksalt '*' kmod.availablesalt '*' kmod.check_available kvmsalt '*' kmod.is_loaded kvmsalt '*' kmod.load kvmsalt '*' kmod.lsmodsalt '*' kmod.mod_listsalt '*' kmod.remove kvmsalt '*' locale.get_localesalt '*' locale.list_availsalt '*' locale.set_locale 'en_US.UTF-8'salt '*' locate.locatesalt '*' locate.statssalt '*' locate.updatedbsalt '*' locate.versionsalt '*' logrotate.set rotate 2salt '*' logrotate.set /var/log/wtmp rotate 2salt '*' logrotate.show_confsalt '*' lowpkg.file_list httpdsalt '*' lowpkg.file_list httpd postfixsalt '*' lowpkg.file_listsalt '*' lowpkg.file_list httpdsalt '*' lowpkg.file_list httpd postfixsalt '*' lowpkg.file_listsalt '*' lowpkg.list_pkgssalt '*' lowpkg.verifysalt '*' match.compound 'L@cheese,foo and *'salt '*' match.data 'spam:eggs'salt '*' match.glob '*'salt '*' match.grain 'os:Ubuntu'salt '*' match.grain_pcre 'os:Fedo.*'salt '*' match.ipcidr '192.168.44.0/24'salt '*' match.list 'server1,server2'salt '*' match.pcre '.*'salt '*' match.pillar 'cheese:foo'salt '*' mine.get '*' network.interfacessalt '*' mine.get 'os:Fedora' network.interfaces grainsalt '*' mine.send network.interfaces eth0salt '*' mine.updatesalt '*' monit.monitor salt '*' monit.restart salt '*' monit.start salt '*' monit.stop salt '*' monit.summarysalt '*' monit.summary salt '*' monit.unmonitor salt '*' mount.activesalt '*' mount.fstabsalt '*' mount.is_fuse_exec sshfssalt '*' mount.mount /mnt/foo /dev/sdz1 Truesalt '*' mount.remount /mnt/foo /dev/sdz1 Truesalt '*' mount.rm_fstab /mnt/foosalt '*' mount.set_fstab /mnt/foo /dev/sdz1 ext4salt '*' mount.swapoff /root/swapfilesalt '*' mount.swapon /root/swapfilesalt '*' mount.swapssalt '*' mount.umount /mnt/foosalt '*' '*' network.arpsalt '*' network.dig archlinux.orgsalt '*' network.hwaddr eth0salt '*' network.in_subnet 10.0.0.0/16salt '*' network.interfacessalt '*' network.ip_addrssalt '*' network.ip_addrs6salt '*' network.netstatsalt '*' network.ping archlinux.orgsalt '*' network.subnetssalt '*' network.traceroute archlinux.orgsalt '*' nginx.configtestsalt '*' nginx.signal reloadsalt '*' nginx.versionsalt '*' partition.align_check /dev/sda minimal 1salt '*' partition.check 1salt '*' partition.cp /dev/sda 2 3salt '*' partition.get_id /dev/sda 1salt '*' partition.mkfs /dev/sda2 fat32salt '*' partition.mklabel /dev/sda msdossalt '*' partition.mkpart /dev/sda primary fat32 0 639salt '*' partition.mkpartfs /dev/sda logical ext2 440 670salt '*' partition.name /dev/sda 1 'My Documents'salt '*' partition.part_list /dev/sdasalt '*' partition.part_list /dev/sda unit=ssalt '*' partition.part_list /dev/sda unit=kBsalt '*' partition.probesalt '*' partition.probe /dev/sdasalt '*' partition.rescue /dev/sda 0 8056salt '*' partition.resize /dev/sda 3 200 850salt '*' partition.rm /dev/sda 5salt '*' partition.set /dev/sda 1 boot onsalt '*' partition.set_id /dev/sda 1 83salt '*' partition.name /dev/sda 1 bootsalt '*' pecl.install fusesalt '*' pecl.listsalt '*' pecl.uninstall fusesalt '*' pecl.update fusesalt '*' pillar.datasalt '*' pillar.data key='roles'salt '*' pillar.ext 'libvirt: _'salt '*' pillar.get pkg:apachesalt '*' pillar.datasalt '*' pillar.data key='roles'salt '*' pillar.rawsalt '*' pillar.raw key='roles'salt '*' pip.freeze /home/code/path/to/virtualenv/salt '*' pip.install , salt '*' pip.install requirements=/path/to/requirements.txtsalt '*' pip.install bin_env=/path/to/virtualenvsalt '*' pip.install bin_env=/path/to/pip_binsalt '*' pip.install markdown,django editable=git+https://github.com/worldcompany/djangoembed.git#egg=djangoembed upgrade=True no_deps=Truesalt '*' pip.list saltsalt '*' pip.uninstall , salt '*' pip.uninstall requirements=/path/to/requirements.txtsalt '*' pip.uninstall bin_env=/path/to/virtualenvsalt '*' pip.uninstall bin_env=/path/to/pip_binsalt '*' pkg.latest_version salt '*' pkg.latest_version fromrepo=epel-testingsalt '*' pkg.latest_version ...salt '*' pkg.clean_metadatasalt '*' pkg.compare '0.2.4-0' '<' '0.2.4.1-0'salt '*' pkg.compare pkg1='0.2.4-0' oper='<' pkg2='0.2.4.1-0'salt '*' pkg.del_repo myreposalt '*' pkg.del_repo myrepo basedir=/path/to/dirsalt '*' pkg.file_list httpdsalt '*' pkg.file_list httpd postfixsalt '*' pkg.file_listsalt '*' pkg.file_list httpdsalt '*' pkg.file_list httpd postfixsalt '*' pkg.file_listsalt '*' pkg.get_repo myreposalt '*' pkg.get_repo myrepo basedir=/path/to/dirsalt '*' pkg.group_diff 'Perl Support'salt '*' pkg.group_info 'Perl Support'salt '*' pkg.group_install groups='["Group 1", "Group 2"]'salt '*' pkg.group_install 'My Group' skip='["foo", "bar"]'salt '*' pkg.group_install 'My Group' include='["foo", "bar"]'salt '*' pkg.group_listsalt '*' pkg.install salt '*' pkg.install pkgs='["foo", "bar"]'salt '*' pkg.install pkgs='["foo", {"bar": "1.2.3-4.el6"}]'salt '*' pkg.install sources='[{"foo": "salt://foo.rpm"}, {"bar": "salt://bar.rpm"}]'salt '*' pkg.latest_version salt '*' pkg.latest_version fromrepo=epel-testingsalt '*' pkg.latest_version ...salt '*' pkg.list_pkgssalt '*' pkg.list_repossalt '*' pkg.list_upgradessalt '*' pkg.mod_repo reponame enabled=1 gpgcheck=1salt '*' pkg.mod_repo reponame basedir=/path/to/dir enabled=1salt '*' pkg.mod_repo reponame baseurl= mirrorlist=http://host.com/salt '*' pkg.perform_cmp '0.2.4-0' '0.2.4.1-0'salt '*' pkg.perform_cmp pkg1='0.2.4-0' pkg2='0.2.4.1-0'salt '*' pkg.purge salt '*' pkg.purge , , salt '*' pkg.purge pkgs='["foo", "bar"]'salt '*' pkg.refresh_dbsalt '*' pkg.remove salt '*' pkg.remove , , salt '*' pkg.remove pkgs='["foo", "bar"]'salt '*' pkg.upgradesalt '*' pkg.upgrade_available salt '*' pkg.verifysalt '*' pkg.version salt '*' pkg.version ...salt '*' pkg_resource.add_pkg '{}' bind 9salt '*' pkg_resource.check_desiredsalt '*' pkg_resource.comparesalt '*' pkg_resource.find_changessalt '*' pkg_resource.pack_pkgs '["foo", {"bar": 1.2}, "baz"]'salt '*' pkg_resource.pack_sources '[{"foo": "salt://foo.rpm"}, {"bar": "salt://bar.rpm"}]'salt '*' pkg_resource.parse_targetssalt '*' pkg_resource.perform_cmpsalt '*' pkg_resource.sort_pkglist '["3.45", "2.13"]'salt '*' pkg_resource.stringify 'vim: 7.127'salt '*' pkg_resource.version vimsalt '*' pkg_resource.version foo bar bazsalt '*' pkg_resource.version 'python*'salt '*' puppet.fact kernelsalt '*' puppet.factssalt '*' puppet.noopsalt '*' puppet.noop tags=basefiles::edit,apache::serversalt '*' puppet.noop debugsalt '*' puppet.noop apply /a/b/manifest.pp modulepath=/a/b/modules tags=basefiles::edit,apache::serversalt '*' puppet.runsalt '*' puppet.run tags=basefiles::edit,apache::serversalt '*' puppet.run debugsalt '*' puppet.run apply /a/b/manifest.pp modulepath=/a/b/modules tags=basefiles::edit,apache::serversalt '*' quota.get_modesalt '*' quota.offsalt '*' quota.onsalt '*' quota.report /media/datasalt '*' quota.set /media/data user=larry block-soft-limit=1048576salt '*' quota.set /media/data group=painters file-hard-limit=1000salt '*' quota.statssalt '*' quota.warnsalt '*' rbenv.defaultsalt '*' rbenv.default 2.0.0-p0salt '*' rbenv.installsalt '*' rbenv.install_ruby 2.0.0-p0salt '*' rbenv.is_installedsalt '*' rbenv.listsalt '*' rbenv.uninstall_ruby 2.0.0-p0salt '*' rbenv.updatesalt '*' rbenv.versionssalt '*' ret.get_fun mysql network.interfacessalt '*' ret.get_jid redis 20421104181954700505salt '*' ret.get_jids mysqlsalt '*' ret.get_minions mysqlsalt '*' rvm.do 2.0.0 salt '*' rvm.gemset_copy foobar bazquosalt '*' rvm.gemset_create 2.0.0 foobarsalt '*' rvm.gemset_delete 2.0.0 foobarsalt '*' rvm.gemset_empty 2.0.0 foobarsalt '*' rvm.gemset_listsalt '*' rvm.gemset_list_allsalt '*' rvm.getsalt '*' rvm.installsalt '*' rvm.install_ruby 1.9.3-p385salt '*' rvm.is_installedsalt '*' rvm.listsalt '*' rvm.reinstall_ruby 1.9.3-p385salt '*' rvm.rubygems 2.0.0 1.8.24salt '*' rvm.set_default 2.0.0salt '*' rvm.wrapper salt '*' saltutil.find_job salt '*' saltutil.is_running state.highstatesalt '*' saltutil.kill_job salt '*' saltutil.refresh_modulessalt '*' saltutil.refresh_pillarsalt '*' saltutil.regen_keyssalt '*' saltutil.revoke_keysalt '*' saltutil.runningsalt '*' saltutil.signal_job 15salt '*' saltutil.sync_allsalt '*' saltutil.sync_grainssalt '*' saltutil.sync_modulessalt '*' saltutil.sync_outputterssalt '*' saltutil.sync_rendererssalt '*' saltutil.sync_returnerssalt '*' saltutil.sync_statessalt '*' saltutil.term_job salt '*' saltutil.update 0.10.3salt '*' service.disable salt '*' service.disabled salt '*' service.enable salt '*' service.enabled salt '*' service.get_allsalt '*' service.get_all limit=upstartsalt '*' service.get_all limit=sysvinitsalt '*' service.get_disabledsalt '*' service.get_disabled limit=upstartsalt '*' service.get_disabled limit=sysvinitsalt '*' service.get_enabledsalt '*' service.get_enabled limit=upstartsalt '*' service.get_enabled limit=sysvinitsalt '*' service.reload salt '*' service.restart salt '*' service.start salt '*' service.status salt '*' service.stop salt '*' shadow.info rootsalt '*' shadow.set_date username 0salt '*' shadow.set_inactdays username 7salt '*' shadow.set_maxdays username 90salt '*' shadow.set_mindays username 7salt '*' shadow.set_password root '$1$UYCIxa628.9qXjpQCjM4a..'salt '*' shadow.set_warndays username 7salt '*' sqlite3.fetch /root/test.db 'SELECT * FROM test;'salt '*' sqlite3.indexes /root/test.dbsalt '*' sqlite3.indices /root/test.dbsalt '*' sqlite3.modify /root/test.db 'CREATE TABLE test(id INT, testdata TEXT);'salt '*' sqlite3.sqlite_versionsalt '*' sqlite3.tables /root/test.dbsalt '*' sqlite3.versionsalt '*' ssh.auth_keys rootsalt '*' ssh.check_key salt '*' root salt://ssh/keyfilesalt '*' ssh.check_known_host key='AAAA...FAaQ=='salt '*' ssh.get_known_host salt '*' ssh.host_keyssalt '*' ssh.recv_known_host enc= port= salt '*' ssh.rm_auth_key salt '*' ssh.rm_known_host salt '*' ssh.set_auth_key ' ' enc='dsa'salt '*' ssh.set_auth_key_from_file salt://ssh_keys/ .id_rsa.pubsalt '*' ssh.set_known_host fingerprint='xx:xx:..:xx' enc='ssh-rsa' config='.ssh/known_hosts'salt '*' state.clear_cachesalt '*' state.high '{"vim": {"pkg": ["installed"]}}'salt '*' state.highstatesalt '*' state.low '{"state": "pkg", "fun": "installed", "name": "vi"}'salt '*' state.runningsalt '*' state.show_highstatesalt '*' state.show_lowstatesalt '*' state.show_sls core,edit.vim devsalt '*' state.show_topsalt '*' state.single pkg.installed name=vimsalt '*' state.sls core,edit.vim devsalt '*' state.template ' 'salt '*' state.template_str ' 'salt '*' state.top reverse_top.slssalt '*' status.all_statussalt '*' status.cpuinfosalt '*' status.cpustatssalt '*' status.customsalt '*' status.diskstatssalt '*' status.diskusage [paths and/or filesystem types]salt '*' status.diskusage # usage for all filesystemssalt '*' status.diskusage / /tmp # usage for / and /tmpsalt '*' status.diskusage ext? # usage for ext[234] filesystemssalt '*' status.diskusage / ext? # usage for / and all ext filesystemssalt '*' status.loadavgsalt '*' status.meminfosalt '*' status.netdevsalt '*' status.netstatssalt '*' status.pid salt '*' status.procssalt '*' status.uptimesalt '*' status.vmstatssalt '*' status.wsalt '*' supervisord.add salt '*' supervisord.custom "mstop '*gunicorn*'"salt '*' supervisord.remove salt '*' supervisord.rereadsalt '*' supervisord.restart salt '*' supervisord.start salt '*' supervisord.statussalt '*' supervisord.status_rawsalt '*' supervisord.stop salt '*' supervisord.updatesalt '*' sys.argspec pkg.installsalt '*' sys.argspec syssalt '*' sys.argspecsalt '*' sys.docsalt '*' sys.doc syssalt '*' sys.doc sys.docsalt '*' sys.doc network.traceroute user.infosalt '*' sys.list_functionssalt '*' sys.list_functions syssalt '*' sys.list_functions sys usersalt '*' sys.list_modulessalt '*' sys.reload_modulessalt '*' sysctl.assign net.ipv4.ip_forward 1salt '*' sysctl.get net.ipv4.ip_forwardsalt '*' sysctl.persist net.ipv4.ip_forward 1salt '*' sysctl.showsalt '*' system.haltsalt '*' system.init 3salt '*' system.poweroffsalt '*' system.rebootsalt '*' system.shutdownsalt '*' test.arg 1 "two" 3.1 txt="hello" wow='{a: 1, b: "hello"}'salt '*' test.arg_repr 1 "two" 3.1 txt="hello" wow='{a: 1, b: "hello"}'salt '*' test.collatz 3salt '*' test.conf_testsalt '*' test.cross_test file.gid_to_group 0salt '*' test.echo 'foo bar baz quo qux'salt '*' test.fib 3salt '*' test.get_optssalt '*' test.kwarg num=1 txt="two" env='{a: 1, b: "hello"}'salt '*' test.not_loadedsalt '*' test.outputter foobarsalt '*' test.pingsalt '*' test.provider servicesalt '*' test.providerssalt '*' test.rand_sleep 60salt '*' test.retcode 42salt '*' test.sleep 20salt '*' test.tty tty0 'This is a test'salt '*' test.tty pts3 'This is a test'salt '*' test.versionsalt '*' test.versions_informationsalt '*' test.versions_reportsalt '*' timezone.get_hwclocksalt '*' timezone.get_offsetsalt '*' timezone.get_zonesalt '*' timezone.get_zonecodesalt '*' timezone.set_hwclock UTCsalt '*' timezone.set_zone 'America/Denver'salt '*' timezone.zone_compare 'America/Denver'salt '*' user.add name salt '*' user.chfullname foo "Foo Bar"salt '*' user.chgid foo 4376salt '*' user.chgroups foo wheel,root Truesalt '*' user.chhome foo /home/users/foo Truesalt '*' user.chhomephone foo "7735551234"salt '*' user.chroomnumber foo 123salt '*' user.chshell foo /bin/zshsalt '*' user.chuid foo 4376salt '*' user.chworkphone foo "7735550123"salt '*' user.delete name remove=True force=Truesalt '*' user.getentsalt '*' user.info rootsalt '*' user.list_groups foosalt '*' user.list_userssalt '*' virtualenv.create /path/to/new/virtualenv
原文出处:Netkiller 系列 手札
本文作者:陈景峯 转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。