diff --git a/.gitignore b/.gitignore index 875db1dd6b57..bcb7c7e19da2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,10 @@ build *.py[co] pkg/arch/*.tar.xz +*.swp +doc/_build +dist +MANIFEST # virtualenv # - ignores directories of a virtualenv when you create it right on diff --git a/AUTHORS b/AUTHORS index d09d9945ebaf..dce530ff988d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -21,10 +21,53 @@ documentation is being maintained by Seth Developers ---------------------------- -Pedro Algarvio, aka, s0undt3ch +Aaron Bull Schaefer +Aaron Toponce +Antti Kaihola +archme +Brad Barden +Brian Wagner +Carlo Pires +Chris Scheller +Christer Edwards +Clint Savage +Corey Quinn +David Boucha +Doug Renn +Eivind Uggedal +epoelke@gmail.com +Eric Poelke +Erik Nolte +Evan Borgstrom +Jed Glazner +Jeffrey C. Ollie +Jeff Schroeder +Jonas Buckner +Joseph Hall +Kent Tenney +Markus Gattol +Martin Schnabel +Matthew Printz +Matthias Teege +Maxim Burgerhout +Mitch Anderson +Nathaniel Whiteinge +Nigel Owen +Pedro Algarvio +Pierre Carrier +Seth House +Seth Vidal +Thomas Schreiber +Thomas S Hatch +Tor Hveem +Travis Cline +Wieland Hoffmann -Joseph P. Hall -Erik Nolte +Growing Community +-------------------------------- -Matthias Teege +Salt is a rapidly growing project with a large community, to view all +contributors please check ohloh, this file can sometimes be out of date: + +https://www.ohloh.net/p/salt/contributors diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000000..81c035d98553 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include salt/msgpack/*.h diff --git a/conf/master b/conf/master index 830a310ce797..01248da7464f 100644 --- a/conf/master +++ b/conf/master @@ -14,7 +14,8 @@ # The port used by the communication interface #ret_port: 4506 -# The root directory prepended to these options: pki_dir, cachedir, log_file. +# The root directory prepended to these options: pki_dir, cachedir, +# sock_dir, log_file. #root_dir: / # Directory used to store public key data @@ -29,16 +30,25 @@ # Set the directory used to hold unix sockets #sock_dir: /tmp/salt-unix +# Set the acceptance level for serialization of messages. This should only be +# set if the master is newer that 0.9.5 and the minion are older, this option +# allows a 0.9.5 and newer master to communicate with minions 0.9.4 and +# earlier. It is not recommended to keep this setting on if the minions are +# all 0.9.5 or higher, as leaving pickle as the serialization medium is slow +# and opens up security risks +# +#serial: msgpack + ##### Security settings ##### ########################################## # Enable "open mode", this mode still maintains encryption, but turns off # authentication, this is only intended for highly secure environments or for -# the situation where your keys end up in a bad state. If you run in open more +# the situation where your keys end up in a bad state. If you run in open mode # you do so at your own risk! #open_mode: False # Enable auto_accept, this setting will automatically accept all incoming -# public keys from the minions +# public keys from the minions. Note that this is insecure. #auto_accept: False ##### State System settings ##### @@ -46,7 +56,7 @@ # The state system uses a "top" file to tell the minions what environment to # use and what modules to use. The state_top file is defined relative to the # root of the base environment -#state_top: top.yml +#state_top: top.sls # # The renderer to use on the minions to render the state data #renderer: yaml_jinja @@ -162,9 +172,19 @@ # Logger levels can be used to tweak specific loggers logging levels. # Imagine you want to have the salt library at the 'warning' level, but, you # still wish to have 'salt.modules' at the 'debug' level: -# log_granular_levels: { +# log_granular_levels: # 'salt': 'warning', # 'salt.modules': 'debug' -# } # #log_granular_levels: {} + + +##### Node Groups ##### +########################################## +# Node groups allow for logical groupings of minion nodes. +# A group consists of a group name and a compound target. +# +# nodegroups: +# group1: 'L@foo.domain.com,bar.domain.com,baz.domain.com and bl*.domain.com', +# group2: 'G@os:Debian and foo.domain.com', + diff --git a/conf/minion b/conf/minion index adba3d17aa6c..ac8ad9d04d1a 100644 --- a/conf/minion +++ b/conf/minion @@ -28,6 +28,13 @@ # Where cache data goes #cachedir: /var/cache/salt +# When waiting for a master to accept the minion's public key, salt will +# contiuously attempt to reconnect until successful. This is the time, in +# seconds, between those reconnection attempts. +# acceptance_wait_time = 10 + + + ##### Minion module management ##### ########################################## # Disable specific modules, this will allow the admin to limit the level os @@ -59,8 +66,22 @@ # #renderer: yaml_jinja # -# Test allows for the state runs to only be test runs -#test: False +# state_verbose allows for the data returned from the minion to be more +# verbose. Normaly only states that fail or states that have changes are +# returned, but setting state_verbose to True will return all states that +# were checked +#state_verbose: False +# +# autoload_dynamic_modules Turns on automatic loading of modules found in the +# environments on the master. This is turned on by default, to turn of +# autoloading modules when states run set this value to False +#autoload_dynamic_modules: True +# +# clean_dynamic_modules keeps the dynamic modules on the minion in sync with +# the dynamic modules on the master, this means that if a dynamic module is +# not on the master it will be deleted from the minion. By default this is +# enabled and can be disabled by changing this value to False +#clean_dynamic_modules: True ###### Security settings ##### ########################################### @@ -96,7 +117,6 @@ # #log_granular_levels: {} - ###### Module configuration ##### ########################################### # Salt allows for modules to be passed arbitrary configuration data, any data diff --git a/debian/AUTHORS b/debian/AUTHORS deleted file mode 100644 index d09d9945ebaf..000000000000 --- a/debian/AUTHORS +++ /dev/null @@ -1,30 +0,0 @@ -============= -Salt Authors -============= - -Whos Who in Salt -============================ - -The Man With the Plan ----------------------------- - -Thomas S Hatch is the main developer of Salt. He is the founder, owner, -maintainer and lead of the Salt project, as well as author of the majority -of the Salt code and documentation. - -Documentation System ----------------------------- - -The documentation system was put together by Seth House, much of the -documentation is being maintained by Seth - -Developers ----------------------------- - -Pedro Algarvio, aka, s0undt3ch - -Joseph P. Hall - -Erik Nolte - -Matthias Teege diff --git a/debian/changelog b/debian/changelog index 5b25936a4304..52368b3f1704 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,36 +1,6 @@ -salt (0.9.4-1) lucid; urgency=low +salt (0.9.5+git20111227.g8182e48-1) unstable; urgency=low - * Build PPA for 0.9.4 + * First package release. (Closes: #643789) - -- Seth House Sun, 27 Nov 2011 16:11:36 -0700 + -- Corey Quinn Mon, 26 Dec 2011 13:55:22 -0800 -salt (0.9.4.pre-d353743-1) lucid; urgency=low - - * Build PPA for Ubuntu (fixed?) - - -- Seth House Wed, 25 Nov 2011 23:19:00 -0600 - -salt (0.9.4.pre-6dd76f2-1) lucid; urgency=low - - * Build PPA for Ubuntu (fixed?) - - -- Seth House Wed, 25 Nov 2011 11:19:00 -0600 - -salt (0.9.4.pre-1) lucid; urgency=low - - * Build PPA for Ubuntu - - -- Seth House Wed, 25 Nov 2011 11:19:00 -0600 - -salt (0.9.2-2) unstable; urgency=low - - * Fixed many lintian(1) warnings and errors - - -- Aaron Toponce Mon, 03 Oct 2011 21:34:25 -0600 - -salt (0.9.2-1) unstable; urgency=low - - * Initial release. (Closes: #643789) - * First Debian package - - -- Aaron Toponce Wed, 28 Sep 2011 01:21:48 -0600 diff --git a/debian/control b/debian/control index d0dda9998c95..b353685884b8 100644 --- a/debian/control +++ b/debian/control @@ -1,24 +1,81 @@ Source: salt Section: admin Priority: optional -Maintainer: Aaron Toponce -Build-Depends: debhelper (>= 7), python-support, cython, python-yaml, - python-setuptools, python-yaml, python-crypto, python-m2crypto, - python-pyzmq (>= 2.1.9), libzmq1 (>= 2.1.9), libzmq-dev (>= 2.1.9), - python (>= 2.6), python-jinja2 -Standards-Version: 3.8.3 +Maintainer: Corey Quinn +Build-Depends: debhelper (>= 7.0.50~), + python-support, + cython, + python-yaml, + python-setuptools, + python-yaml, + python-crypto, + python-m2crypto, + python-zmq (>= 2.1.9), + libzmq1 (>= 2.1.9), + libzmq-dev (>= 2.1.9), + python (>= 2.6), + python-dev (>= 2.6), + python-jinja2 +Standards-Version: 3.9.2 Homepage: http://saltstack.org #Vcs-Git: git://git.debian.org/collab-maint/salt.git #Vcs-Browser: http://git.debian.org/?p=collab-maint/salt.git;a=summary -Package: salt + +Package: salt-common +Architecture: any +Depends: ${python:Depends}, + ${misc:Depends} +Description: Shared libraries that salt requires for all packages + This package is a powerful remote execution manager that can be used + to administer servers in a fast and efficient way. + . + It allows commands to be executed across large groups of servers. This + means systems can be easily managed, but data can also be easily gathered. + Quick introspection into running systems becomes a reality. + . + Remote execution is usually used to set up a certain state on a remote + system. Salt addresses this problem as well, the salt state system uses + salt state files to define the state a server needs to be in. + . + Between the remote execution system, and state management Salt addresses + the backbone of cloud and data center management. + . + This particular package provides shared libraries that salt-master, salt-minion, + and salt-syndic require to function. + + +Package: salt-master +Architecture: all +Depends: ${python:Depends}, + ${misc:Depends}, + salt-common +Description: This package provides a remote manager to administer servers via salt + This package is a powerful remote execution manager that can be used + to administer servers in a fast and efficient way. + . + It allows commands to be executed across large groups of servers. This + means systems can be easily managed, but data can also be easily gathered. + Quick introspection into running systems becomes a reality. + . + Remote execution is usually used to set up a certain state on a remote + system. Salt addresses this problem as well, the salt state system uses + salt state files to define the state a server needs to be in. + . + Between the remote execution system, and state management Salt addresses + the backbone of cloud and data center management. + . + This particular package provides the salt controller. + + +Package: salt-minion Architecture: all -Depends: ${python:Depends}, ${misc:Depends}, python-setuptools, - python-yaml, python-crypto, python-m2crypto, python-pyzmq (>= 2.1.9), - libzmq1 (>= 2.1.9), libzmq-dev (>= 2.1.9), python (>= 2.6), python-jinja2 -Description: This package provides a remote manager to administer servers. - This package is a powerful remote execution manager that can be used to - administer servers in a fast and efficient way. +Depends: ${python:Depends}, + ${misc:Depends}, + salt-common +Description: This package represents the client package for salt + This package is a powerful remote execution manager that can be used + to administer servers in a fast and efficient way. . It allows commands to be executed across large groups of servers. This means systems can be easily managed, but data can also be easily gathered. @@ -30,3 +87,29 @@ Description: This package provides a remote manager to administer servers. . Between the remote execution system, and state management Salt addresses the backbone of cloud and data center management. + . + This particular package provides the worker / agent for salt. + + +Package: salt-syndic +Architecture: all +Depends: ${python:Depends}, + ${misc:Depends}, + salt-master +Description: salt-syndic represents the master-of-masters for salt + This package is a powerful remote execution manager that can be used + to administer servers in a fast and efficient way. + . + It allows commands to be executed across large groups of servers. This + means systems can be easily managed, but data can also be easily gathered. + Quick introspection into running systems becomes a reality. + . + Remote execution is usually used to set up a certain state on a remote + system. Salt addresses this problem as well, the salt state system uses + salt state files to define the state a server needs to be in. + . + Between the remote execution system, and state management Salt addresses + the backbone of cloud and data center management. + . + This particular package provides the master of masters for salt-- it enables the management + of multiple masters at a time. diff --git a/debian/files b/debian/files deleted file mode 100644 index 69bfff7778d2..000000000000 --- a/debian/files +++ /dev/null @@ -1 +0,0 @@ -salt_0.9.4-1_all.deb admin optional diff --git a/debian/links b/debian/links new file mode 100644 index 000000000000..e325b02fa1d7 --- /dev/null +++ b/debian/links @@ -0,0 +1,8 @@ +usr/share/salt/salt /usr/bin/salt +usr/share/salt/salt-master /usr/bin/salt-master +usr/share/salt/salt-syndic /usr/bin/salt-syndic +usr/share/salt/salt-cp /usr/bin/salt-cp +usr/share/salt/salt-key /usr/bin/salt-key +usr/share/salt/salt-run /usr/bin/salt-run +usr/share/salt/salt-minion /usr/bin/salt-minion +usr/share/salt/salt-call /usr/bin/salt-call diff --git a/debian/patches/no-license b/debian/patches/no-license deleted file mode 100644 index 77ebf370f3f1..000000000000 --- a/debian/patches/no-license +++ /dev/null @@ -1,13 +0,0 @@ -Index: salt-0.9.4/setup.py -=================================================================== ---- salt-0.9.4.orig/setup.py 2011-10-03 21:07:32.524520895 -0600 -+++ salt-0.9.4/setup.py 2011-10-03 21:14:33.852854281 -0600 -@@ -92,7 +92,7 @@ - ['salt/modules/cytest.pyx', - ]), - (doc_path, -- ['LICENSE' -+ [ - ]), - (template_path, - ['doc/example/templates/yaml-jinja.yml', diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 7a5b31479f82..000000000000 --- a/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -no-license diff --git a/debian/rules b/debian/rules index e129263c6aca..a140040585e6 100755 --- a/debian/rules +++ b/debian/rules @@ -1,18 +1,15 @@ #!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 %: - dh $@ + dh $@ + +#override_dh_installinit: +# dh_installinit --no-start --name="salt-master" +# dh_installinit --no-start --name="salt-minion" +# dh_installinit --no-start --name="salt-syndic" -override_dh_installinit: - dh_installinit --no-start --name="salt-master" - dh_installinit --no-start --name="salt-minion" - dh_installinit --no-start --name="salt-syndic" +get-orig-source: + git clone https://github.com/saltstack/salt.git + mv salt salt-0.9.5 + tar -zcvf salt_0.9.5.orig.tar.gz --exclude "debian*" --exclude-vcs salt-0.9.5 + rm -rf salt-0.9.5 diff --git a/debian/salt-common.install b/debian/salt-common.install new file mode 100644 index 000000000000..8ef4a2454ea8 --- /dev/null +++ b/debian/salt-common.install @@ -0,0 +1,9 @@ +usr/share/man/man1/salt-minion.1 +usr/share/man/man1/salt-call.1 +usr/share/man/man1/salt-key.1 +usr/share/man/man1/salt-master.1 +usr/share/man/man1/salt-syndic.1 +usr/share/man/man1/salt-cp.1 +usr/share/man/man1/salt.1 +conf/minion /etc/salt/minion +salt/* /usr/share/salt/ diff --git a/debian/salt.salt-master.init b/debian/salt-master.init similarity index 90% rename from debian/salt.salt-master.init rename to debian/salt-master.init index 08399953b841..5171ca90427b 100644 --- a/debian/salt.salt-master.init +++ b/debian/salt-master.init @@ -29,7 +29,7 @@ DEBIAN_VERSION=/etc/debian_version SUSE_RELEASE=/etc/SuSE-release # Source function library. if [ -f $DEBIAN_VERSION ]; then - break + break elif [ -f $SUSE_RELEASE -a -r /etc/rc.status ]; then . /etc/rc.status else @@ -46,11 +46,11 @@ PROC_LIST="" RETVAL=0 findproc() { - PROC_LIST=`$PS_CMD | grep $PROCESS | grep -v grep | grep -v sh | grep -v vi | awk '{ print $1 }'` + PROC_LIST=`$PS_CMD | grep 'bin/python.*salt-master' | grep -v grep | grep -v sh | grep -v vi | awk '{ print $1 }'` } start() { - echo -n $"Starting salt-master daemon: " + echo -n "Starting salt-master daemon: " if [ -f $SUSE_RELEASE ]; then startproc -f -p /var/run/$SERVICE.pid /usr/bin/salt-master -d $CONFIG_ARGS rc_status -v @@ -72,7 +72,7 @@ start() { } stop() { - echo -n $"Stopping salt-master daemon: " + echo -n "Stopping salt-master daemon: " if [ -f $SUSE_RELEASE ]; then killproc -TERM /usr/bin/salt-master rc_status -v @@ -131,7 +131,7 @@ case "$1" in RETVAL=$? ;; *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}" + echo "Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}" exit 1 ;; esac diff --git a/debian/salt-master.install b/debian/salt-master.install new file mode 100644 index 000000000000..53d4c1340db6 --- /dev/null +++ b/debian/salt-master.install @@ -0,0 +1 @@ +conf/master /etc/salt/master diff --git a/debian/salt-master.manpages b/debian/salt-master.manpages new file mode 100644 index 000000000000..074f304fb2c4 --- /dev/null +++ b/debian/salt-master.manpages @@ -0,0 +1,6 @@ +doc/man/salt.7 +doc/man/salt.1 +doc/man/salt-master.1 +doc/man/salt-key.1 +doc/man/salt-cp.1 +doc/man/salt-run.1 diff --git a/debian/salt.salt-minion.init b/debian/salt-minion.init similarity index 88% rename from debian/salt.salt-minion.init rename to debian/salt-minion.init index 1248db6c23f0..d70f742e1159 100644 --- a/debian/salt.salt-minion.init +++ b/debian/salt-minion.init @@ -29,7 +29,7 @@ DEBIAN_VERSION=/etc/debian_version SUSE_RELEASE=/etc/SuSE-release # Source function library. if [ -f $DEBIAN_VERSION ]; then - break + break elif [ -f $SUSE_RELEASE -a -r /etc/rc.status ]; then . /etc/rc.status else @@ -46,18 +46,18 @@ PROC_LIST="" RETVAL=0 findproc() { - PROC_LIST=`$PS_CMD | grep $PROCESS | grep -v grep | grep -v sh | grep -v vi | awk '{ print $1 }'` + PROC_LIST=`$PS_CMD | grep 'bin/python.*salt-minion' | grep -v grep | grep -v sh | grep -v vi | awk '{ print $1 }'` } start() { - echo -n $"Starting salt-minion daemon: " + echo -n "Starting salt-minion daemon: " if [ -f $SUSE_RELEASE ]; then startproc -f -p /var/run/$SERVICE.pid /usr/bin/salt-minion -d $CONFIG_ARGS rc_status -v elif [ -e $DEBIAN_VERSION ]; then findproc if [ -n "$PROC_LIST" ]; then - echo -n "already started, lock file found" + echo -n "already started, lock file found" RETVAL=1 elif /usr/bin/python /usr/bin/salt-minion -d; then echo -n "OK" @@ -72,7 +72,7 @@ start() { } stop() { - echo -n $"Stopping salt-minion daemon: " + echo -n "Stopping salt-minion daemon: " if [ -f $SUSE_RELEASE ]; then killproc -TERM /usr/bin/salt-minion rc_status -v @@ -131,7 +131,7 @@ case "$1" in RETVAL=$? ;; *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}" + echo "Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}" exit 1 ;; esac diff --git a/debian/salt-minion.install b/debian/salt-minion.install new file mode 100644 index 000000000000..7ed61cee7ef1 --- /dev/null +++ b/debian/salt-minion.install @@ -0,0 +1,4 @@ +scripts/salt-minion /usr/share/salt/salt-minion +scripts/salt-call /usr/share/salt/salt-call +modules/* /usr/share/salt/modules/ +conf/minion /etc/salt/minion diff --git a/debian/salt-minion.manpages b/debian/salt-minion.manpages new file mode 100644 index 000000000000..d8d924f31a95 --- /dev/null +++ b/debian/salt-minion.manpages @@ -0,0 +1,2 @@ +doc/man/salt-call.1 +doc/man/salt-minion.1 diff --git a/debian/salt.salt-syndic.init b/debian/salt-syndic.init similarity index 88% rename from debian/salt.salt-syndic.init rename to debian/salt-syndic.init index c0d53ddd248e..8d7796b3a826 100644 --- a/debian/salt.salt-syndic.init +++ b/debian/salt-syndic.init @@ -17,7 +17,7 @@ # chkconfig header -# chkconfig: 2345 99 01 +# chkconfig: 2345 99 01 # description: This is a daemon that controls the salt mininons # # processname: /usr/bin/salt-syndic @@ -29,7 +29,7 @@ DEBIAN_VERSION=/etc/debian_version SUSE_RELEASE=/etc/SuSE-release # Source function library. if [ -f $DEBIAN_VERSION ]; then - break + break elif [ -f $SUSE_RELEASE -a -r /etc/rc.status ]; then . /etc/rc.status else @@ -46,18 +46,18 @@ PROC_LIST="" RETVAL=0 findproc() { - PROC_LIST=`$PS_CMD | grep $PROCESS | grep -v grep | grep -v sh | grep -v vi | awk '{ print $1 }'` + PROC_LIST=`$PS_CMD | grep 'bin/python.*salt-syndic' | grep -v grep | grep -v sh | grep -v vi | awk '{ print $1 }'` } start() { - echo -n $"Starting salt-syndic daemon: " + echo -n "Starting salt-syndic daemon: " if [ -f $SUSE_RELEASE ]; then startproc -f -p /var/run/$SERVICE.pid /usr/bin/salt-syndic -d $CONFIG_ARGS rc_status -v elif [ -e $DEBIAN_VERSION ]; then findproc if [ -n "$PROC_LIST" ]; then - echo -n "already started, lock file found" + echo -n "already started, lock file found" RETVAL=1 elif /usr/bin/python /usr/bin/salt-syndic -d; then echo -n "OK" @@ -72,7 +72,7 @@ start() { } stop() { - echo -n $"Stopping salt-syndic daemon: " + echo -n "Stopping salt-syndic daemon: " if [ -f $SUSE_RELEASE ]; then killproc -TERM /usr/bin/salt-syndic rc_status -v @@ -127,7 +127,7 @@ case "$1" in RETVAL=$? ;; *) - echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}" + echo "Usage: $0 {start|stop|status|restart|reload|force-reload}" exit 1 ;; esac diff --git a/debian/salt-syndic.install b/debian/salt-syndic.install new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/debian/salt-syndic.manpages b/debian/salt-syndic.manpages new file mode 100644 index 000000000000..09238dc4e1a8 --- /dev/null +++ b/debian/salt-syndic.manpages @@ -0,0 +1 @@ +doc/man/salt-syndic.1 diff --git a/debian/salt.debhelper.log b/debian/salt.debhelper.log deleted file mode 100644 index 8609f659ff84..000000000000 --- a/debian/salt.debhelper.log +++ /dev/null @@ -1,48 +0,0 @@ -dh_auto_configure -dh_auto_build -dh_auto_test -dh_prep -dh_installdirs -dh_auto_install -dh_install -dh_installdocs -dh_installchangelogs -dh_installexamples -dh_installman -dh_installcatalogs -dh_installcron -dh_installdebconf -dh_installemacsen -dh_installifupdown -dh_installinfo -dh_pysupport -override_dh_installinit dh_installinit -override_dh_installinit dh_installinit -override_dh_installinit dh_installinit -dh_installinit -dh_installmenu -dh_installmime -dh_installmodules -dh_installlogcheck -dh_installlogrotate -dh_installpam -dh_installppp -dh_installudev -dh_installwm -dh_installxfonts -dh_installgsettings -dh_bugfiles -dh_ucf -dh_lintian -dh_gconf -dh_icons -dh_perl -dh_usrlocal -dh_link -dh_compress -dh_fixperms -dh_installdeb -dh_gencontrol -dh_md5sums -dh_builddeb -dh_builddeb diff --git a/debian/salt.postinst.debhelper b/debian/salt.postinst.debhelper deleted file mode 100644 index d081710f0ebe..000000000000 --- a/debian/salt.postinst.debhelper +++ /dev/null @@ -1,20 +0,0 @@ -# Automatically added by dh_pysupport -if which update-python-modules >/dev/null 2>&1; then - update-python-modules salt.public -fi -# End automatically added section -# Automatically added by dh_installinit -if [ -x "/etc/init.d/salt-master" ]; then - update-rc.d salt-master defaults >/dev/null || exit $? -fi -# End automatically added section -# Automatically added by dh_installinit -if [ -x "/etc/init.d/salt-minion" ]; then - update-rc.d salt-minion defaults >/dev/null || exit $? -fi -# End automatically added section -# Automatically added by dh_installinit -if [ -x "/etc/init.d/salt-syndic" ]; then - update-rc.d salt-syndic defaults >/dev/null || exit $? -fi -# End automatically added section diff --git a/debian/salt.postrm.debhelper b/debian/salt.postrm.debhelper deleted file mode 100644 index dabbbd39cbd9..000000000000 --- a/debian/salt.postrm.debhelper +++ /dev/null @@ -1,15 +0,0 @@ -# Automatically added by dh_installinit -if [ "$1" = "purge" ] ; then - update-rc.d salt-syndic remove >/dev/null -fi -# End automatically added section -# Automatically added by dh_installinit -if [ "$1" = "purge" ] ; then - update-rc.d salt-minion remove >/dev/null -fi -# End automatically added section -# Automatically added by dh_installinit -if [ "$1" = "purge" ] ; then - update-rc.d salt-master remove >/dev/null -fi -# End automatically added section diff --git a/debian/salt.prerm.debhelper b/debian/salt.prerm.debhelper deleted file mode 100644 index b4c5f5ab1d4b..000000000000 --- a/debian/salt.prerm.debhelper +++ /dev/null @@ -1,5 +0,0 @@ -# Automatically added by dh_pysupport -if which update-python-modules >/dev/null 2>&1; then - update-python-modules -c salt.public -fi -# End automatically added section diff --git a/debian/salt.substvars b/debian/salt.substvars deleted file mode 100644 index 8665d5cf98ab..000000000000 --- a/debian/salt.substvars +++ /dev/null @@ -1,3 +0,0 @@ -python:Versions=2.6, 2.7 -python:Depends=python, python-support (>= 0.90.0) -misc:Depends= diff --git a/doc/_templates/indexsidebar.html b/doc/_templates/indexsidebar.html index 768575ff4721..8457607eac6b 100644 --- a/doc/_templates/indexsidebar.html +++ b/doc/_templates/indexsidebar.html @@ -13,8 +13,10 @@

Download

#} {% endif %} -

Notice something different? We moved the Salt repository to the new saltstack GitHub organization. -Read why. +

Recent updates

+

Our IRC channel is now on the popular Freenode network. See you there!

+

The Salt git repository can now be found at the new saltstack GitHub organization. +Read why.

Get help. Get involved.

@@ -25,6 +27,6 @@

Get help. Get involved.

-

Join us via IRC in the #salt channel on - OFTC.

+

Join us via IRC in the #salt channel via + Freenode's webchat.

Search bugs or file one.

diff --git a/doc/conf.py b/doc/conf.py index 4aa81d70b7e3..6ece48c1e4eb 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -3,11 +3,13 @@ import sys, os docs_basepath = os.path.abspath(os.path.join(os.path.dirname(__file__))) +addtl_paths = ( + os.pardir, # salt directory (for autodoc) + '_ext', # custom Sphinx extensions +) -sys.path.extend([ - os.path.join(docs_basepath, '..'), # salt directory (for autodoc) - os.path.join(docs_basepath, '_ext'), # Sphinx extensions -]) +for path in addtl_paths: + sys.path.insert(0, os.path.abspath(os.path.join(docs_basepath, path))) from salt import __version__ diff --git a/doc/gen_gource b/doc/gen_gource new file mode 100644 index 000000000000..5a151d333628 --- /dev/null +++ b/doc/gen_gource @@ -0,0 +1,7 @@ +#!/bin/bash +# +# This script is used to generate the gource video released with each release of Salt +# +# +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 + diff --git a/doc/man/salt-call.1 b/doc/man/salt-call.1 index dfebb31eccbd..5a435a76b791 100644 --- a/doc/man/salt-call.1 +++ b/doc/man/salt-call.1 @@ -1,4 +1,4 @@ -.TH "SALT-CALL" "1" "November 27, 2011" "0.9.4" "Salt" +.TH "SALT-CALL" "1" "January 14, 2012" "0.9.5" "Salt" .SH NAME salt-call \- salt-call Documentation . diff --git a/doc/man/salt-cp.1 b/doc/man/salt-cp.1 index 38256b765f82..e0196f6f49d8 100644 --- a/doc/man/salt-cp.1 +++ b/doc/man/salt-cp.1 @@ -1,4 +1,4 @@ -.TH "SALT-CP" "1" "November 27, 2011" "0.9.4" "Salt" +.TH "SALT-CP" "1" "January 14, 2012" "0.9.5" "Salt" .SH NAME salt-cp \- salt-cp Documentation . @@ -80,7 +80,7 @@ regular expresion>\(aq; example: \(aqos:Arch.*\(aq .INDENT 0.0 .TP .B \-Q, \-\-query -Execute a salt command query, this can be used to find the results os a +Execute a salt command query, this can be used to find the results of a previous function call: \-Q test.echo\(aq) .UNINDENT .INDENT 0.0 diff --git a/doc/man/salt-key.1 b/doc/man/salt-key.1 index b6142973adf1..58cba2c6c43d 100644 --- a/doc/man/salt-key.1 +++ b/doc/man/salt-key.1 @@ -1,4 +1,4 @@ -.TH "SALT-KEY" "1" "November 27, 2011" "0.9.4" "Salt" +.TH "SALT-KEY" "1" "January 14, 2012" "0.9.5" "Salt" .SH NAME salt-key \- salt-key Documentation . diff --git a/doc/man/salt-master.1 b/doc/man/salt-master.1 index f5b34ded028c..067ad4e9d5cd 100644 --- a/doc/man/salt-master.1 +++ b/doc/man/salt-master.1 @@ -1,4 +1,4 @@ -.TH "SALT-MASTER" "1" "November 27, 2011" "0.9.4" "Salt" +.TH "SALT-MASTER" "1" "January 14, 2012" "0.9.5" "Salt" .SH NAME salt-master \- salt-master Documentation . diff --git a/doc/man/salt-minion.1 b/doc/man/salt-minion.1 index 8176a5731d00..ac1ed16d7059 100644 --- a/doc/man/salt-minion.1 +++ b/doc/man/salt-minion.1 @@ -1,4 +1,4 @@ -.TH "SALT-MINION" "1" "November 27, 2011" "0.9.4" "Salt" +.TH "SALT-MINION" "1" "January 14, 2012" "0.9.5" "Salt" .SH NAME salt-minion \- salt-minion Documentation . diff --git a/doc/man/salt-run.1 b/doc/man/salt-run.1 index ceb615024ca2..6c88774014b6 100644 --- a/doc/man/salt-run.1 +++ b/doc/man/salt-run.1 @@ -1,4 +1,4 @@ -.TH "SALT-RUN" "1" "November 27, 2011" "0.9.4" "Salt" +.TH "SALT-RUN" "1" "January 14, 2012" "0.9.5" "Salt" .SH NAME salt-run \- salt-run Documentation . diff --git a/doc/man/salt-syndic.1 b/doc/man/salt-syndic.1 index 1d35a184b719..a68f744f3426 100644 --- a/doc/man/salt-syndic.1 +++ b/doc/man/salt-syndic.1 @@ -1,4 +1,4 @@ -.TH "SALT-SYNDIC" "1" "November 27, 2011" "0.9.4" "Salt" +.TH "SALT-SYNDIC" "1" "January 14, 2012" "0.9.5" "Salt" .SH NAME salt-syndic \- salt-syndic Documentation . diff --git a/doc/man/salt.1 b/doc/man/salt.1 index da3c461a2bb5..4756ef854d37 100644 --- a/doc/man/salt.1 +++ b/doc/man/salt.1 @@ -1,4 +1,4 @@ -.TH "SALT" "1" "November 27, 2011" "0.9.4" "Salt" +.TH "SALT" "1" "January 14, 2012" "0.9.5" "Salt" .SH NAME salt \- salt . @@ -37,7 +37,9 @@ salt \(aq*\(aq [ options ] sys.doc .sp salt \-E \(aq.*\(aq [ options ] sys.doc cmd .sp -salt \-F \(aqoperatingsystem:Arch.*\(aq [ options ] test.ping +salt \-G \(aqos:Arch.*\(aq [ options ] test.ping +.sp +salt \-C \fI\%'G@os\fP:Arch.* and webserv* or \fI\%G@kernel\fP:FreeBSD\(aq [ options ] test.ping .sp salt \-Q test.ping .UNINDENT @@ -60,6 +62,11 @@ The timeout in seconds to wait for replies from the salt minions. .UNINDENT .INDENT 0.0 .TP +.B \-\-version +Print the version of salt that is running. +.UNINDENT +.INDENT 0.0 +.TP .B \-E, \-\-pcre The target expression will be interpreted as a pcre regular expression rather than a shell glob. @@ -79,8 +86,35 @@ regular expression>\(aq; example: \(aqos:Arch.*\(aq .UNINDENT .INDENT 0.0 .TP +.B \-C, \-\-compound +Utilize many target definitions to make the call very granular. This option +takes a group of targets separated by and or or. The default matcher is a +glob as usual, if something other than a glob is used preface it with the +letter denoting the type, example: \(aqwebserv* and \fI\%G@os\fP:Debian or \fI\%E@db.*\fP\(aq +make sure that the compound target is encapsulated in quotes. +.UNINDENT +.INDENT 0.0 +.TP +.B \-X, \-\-exsel +Instead of using shell globs use the return code of a function. +.UNINDENT +.INDENT 0.0 +.TP +.B \-N, \-\-nodegroup +Use a predefined compound target defined in the salt master configuration +file +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-return +Chose an alternative returner to call on the minion, if an alternative +returner is used then the return will not come back tot he command line +but will be sent to the specified return system. +.UNINDENT +.INDENT 0.0 +.TP .B \-Q, \-\-query -Execute a salt command query, this can be used to find the results os a +Execute a salt command query, this can be used to find the results of a previous function call: \-Q test.echo\(aq) .UNINDENT .INDENT 0.0 @@ -90,6 +124,29 @@ The location of the salt master configuration file, the salt master settings are required to know where the connections are; default=/etc/salt/master .UNINDENT +.INDENT 0.0 +.TP +.B \-\-raw\-out +Print the output from the salt command in raw python +form, this is suitable for re\-reading the output into +an executing python script with eval. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-text\-out +Print the output from the salt command in the same +form the shell would. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-yaml\-out +Print the output from the salt command in yaml. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-json\-out +Print the output from the salt command in json. +.UNINDENT .SH SEE ALSO .sp \fIsalt(7)\fP diff --git a/doc/man/salt.7 b/doc/man/salt.7 index 34b6185a97de..7545aabab458 100644 --- a/doc/man/salt.7 +++ b/doc/man/salt.7 @@ -1,4 +1,4 @@ -.TH "SALT" "7" "November 27, 2011" "0.9.4" "Salt" +.TH "SALT" "7" "January 14, 2012" "0.9.5" "Salt" .SH NAME salt \- Salt Documentation . @@ -219,53 +219,42 @@ gcc — dynamic \fI\%Cython\fP module compiling .IP \(bu 2 \fI\%Debian / Ubuntu\fP .IP \(bu 2 +\fI\%Gentoo\fP +.IP \(bu 2 +\fI\%FreeBSD\fP +.IP \(bu 2 \fI\%Installing from source\fP .UNINDENT .SS Red Hat -.SS Fedora .sp -Salt is currently being built for Fedora. The latest koji build pages can be -found here: +We are working to get Salt packages into EPEL. In the meantime you can +\fByum install salt\-master salt\-minion\fP via our Fedora People +repository. +.SS Red Hat Enterprise Linux 5 & 6 or CentOS 5 & 6 .INDENT 0.0 -.IP \(bu 2 -\fI\%Fedora 14\fP -.IP \(bu 2 -\fI\%Fedora 15\fP -.IP \(bu 2 -\fI\%Fedora Rawhide\fP -.UNINDENT -.SS Red Hat Enterprise Linux 6 -.sp -Salt is being built for EPEL6. \fI\%Browse the latest builds.\fP +.IP 1. 3 +Install the \fI\%EPEL\fP repository: +.IP 2. 3 +Install our repository on FedoraPeople: .sp -The ZeroMQ packages in EPEL6 have been tested with this package, but if you -still have issues these backports may help: -.INDENT 0.0 -.IP \(bu 2 -\fI\%ZeroMQ backport\fP -.IP \(bu 2 -\fI\%pyzmq bindings backport\fP -.IP \(bu 2 -\fI\%Package to set up EPEL repository\fP -(provided by the EPEL project) +.nf +.ft C +wget \-O /etc/yum.repos.d/epel\-salt.repo \e + http://repos.fedorapeople.org/repos/herlo/salt/epel\-salt.repo +.ft P +.fi .UNINDENT -.SS Red Hat Enterprise Linux 5 -.sp -Salt is being built for RHEL5, updates will be available soon! -.sp -Red Hat Enterprise Linux 5 requires more backports and the use of the Python -2.6 stack provided in the EPEL repository. All of the listed packages need to -be installed and the EPEL repository enabled to bring in the needed -dependencies: +.SS Fedora 15 & 16 .INDENT 0.0 -.IP \(bu 2 -\fI\%Salt rpm\fP -.IP \(bu 2 -\fI\%YAML bindings for Python 2.6\fP -.IP \(bu 2 -\fI\%ZeroMQ backport\fP -.IP \(bu 2 -\fI\%pyzmq bindings backport\fP +.IP 1. 3 +Install our repository on FedoraPeople: +.sp +.nf +.ft C +wget \-O /etc/yum.repos.d/fedora\-salt.repo \e + http://repos.fedorapeople.org/repos/herlo/salt/fedora\-salt.repo +.ft P +.fi .UNINDENT .SS Arch Linux .sp @@ -279,75 +268,94 @@ Salt can be easily installed from the Arch Linux AUR in one of two flavors: .SS Debian / Ubuntu .SS Ubuntu .sp -A PPA is available until we can get packages into apt: +We are working to get Salt into apt. In the meantime we have a PPA available +for Lucid: .sp .nf .ft C aptitude \-y install python\-software\-properties +add\-apt\-repository ppa:chris\-lea/libpgm +add\-apt\-repository ppa:chris\-lea/zeromq add\-apt\-repository ppa:saltstack/salt aptitude update aptitude install salt .ft P .fi -.IP "Installing ZeroMQ on Ubuntu Lucid (10.04 LTS)" +.SS Debian +.sp +\fI\%A deb package is currently in testing\fP for inclusion in apt. Until that is +accepted you can install Salt by downloading the latest \fB.deb\fP in the +\fI\%downloads section on GitHub\fP and installing that manually: +.sp +.nf +.ft C +dpkg \-i salt\-0.9.5\&.deb +.ft P +.fi +.IP "Installing ZeroMQ on Squeeze (Debian 6)" .sp -The ZeroMQ package is available starting with Maverick but there are \fI\%PPA -packages available for Lucid\fP for both ZeroMQ and pyzmq. You will need to -also enable the following PPAs before running the commands above: +There is a \fI\%python-zmq\fP package available in Debian "wheezy (testing)". +If you don\(aqt have that repo enabled the best way to install Salt and pyzmq +is by using \fBpip\fP (or \fBeasy_install\fP): .sp .nf .ft C -add\-apt\-repository ppa:chris\-lea/libpgm -add\-apt\-repository ppa:chris\-lea/zeromq +pip install pyzmq salt .ft P .fi .RE -.SS Debian +.SS Gentoo .sp -\fI\%A deb package is currently in testing\fP. Until that is accepted you can -install Salt via \fBeasy_install\fP or \fBpip\fP: +Salt can be easily installed on Gentoo: .sp .nf .ft C -pip install salt +emerge pyyaml m2crypto pycrypto jinja pyzmq .ft P .fi -.IP "Installing ZeroMQ on Squeeze (Debian 6)" .sp -ZeroMQ packages are available in squeeze\-backports. +Then download and install from source: .INDENT 0.0 .IP 1. 3 -Add the following line to your \fB/etc/apt/sources.list\fP: +Download the latest source tarball from the GitHub downloads directory for +the Salt project: \fI\%https://github.com/downloads/saltstack/salt/salt-0.9.5.tar.gz\fP +.IP 2. 3 +Untar the tarball and run the \fBsetup.py\fP as root: +.UNINDENT .sp .nf .ft C -deb http://backports.debian.org/debian\-backports squeeze\-backports main +tar xvf salt\-0.9.5\&.tar.gz +cd salt\-0.9.5 +python2 setup.py install .ft P .fi -.IP 2. 3 -Run: +.SS FreeBSD +.sp +Salt is available in the FreeBSD ports tree: .sp .nf .ft C -aptitude update -aptitude install libzmq1 python\-zmq +cd /usr/ports/sysutils/salt && make install clean .ft P .fi -.UNINDENT +.IP "See also" +.sp +\fBfreebsd installation guide\fP .RE .SS Installing from source .INDENT 0.0 .IP 1. 3 Download the latest source tarball from the GitHub downloads directory for -the Salt project: \fI\%https://github.com/downloads/saltstack/salt/salt-0.9.4.tar.gz\fP +the Salt project: \fI\%https://github.com/downloads/saltstack/salt/salt-0.9.5.tar.gz\fP .IP 2. 3 Untar the tarball and run the \fBsetup.py\fP as root: .UNINDENT .sp .nf .ft C -tar xvf salt\-0.9.4\&.tar.gz -cd salt\-0.9.4 +tar xvf salt\-0.9.5\&.tar.gz +cd salt\-0.9.5 python2 setup.py install .ft P .fi @@ -743,6 +751,16 @@ You can specify multiple \fIstate declarations\fP under an \fIID declaration\fP. For example, a quick modification to our \fBwebserver.sls\fP to also start Apache if it is not running: .sp +.nf +.ft C +apache: + pkg: + \- installed + service: + \- running +.ft P +.fi +.sp Try stopping Apache before running \fBstate.highstate\fP once again and observe the output. .SS Expand the SLS module @@ -778,6 +796,23 @@ webserver so we don\(aqt want Salt to install our HTML file until Apache is installed and running. Include the following at the bottom of your \fBwebserver/init.sls\fP file: .sp +.nf +.ft C +apache: + pkg: + \- installed + service: + \- running + +/var/www/index.html: # ID declaration + file: # state declaration + \- managed # function + \- source: salt://webserver/index.html # function arg + \- require: # requisite declaration + \- pkg: apache # requisite reference +.ft P +.fi +.sp Again in \fBline 1\fP is the \fIID declaration\fP. In this example it is the location we want to install our custom HTML file. (\fBNote:\fP the default location that Apache serves may differ from the above on your OS or distro. @@ -819,7 +854,7 @@ master using Salt\(aqs File Server: .sp .nf .ft C -salt \(aq*\(aq salt.highstate +salt \(aq*\(aq state.highstate .ft P .fi .sp @@ -835,6 +870,23 @@ For example, if you use Salt to install an Apache virtual host configuration file and want to restart Apache whenever that file is changed you could modify our Apache example from earlier as follows: .sp +.nf +.ft C +/etc/httpd/extra/httpd\-vhosts.conf: + file: + \- managed + \- source: salt://webserver/httpd\-vhosts.conf + +apache: + pkg: + \- installed + service: + \- running + \- watch: + \- file: /etc/httpd/extra/httpd\-vhosts.conf +.ft P +.fi +.sp If the pkg and service names differ on your OS or distro of choice you can specify each one separately using a \fIname declaration\fP which explained in \fBPart 3\fP. @@ -1014,6 +1066,25 @@ declaration\fP. For example the previous example is a bit more maintainable if rewritten as the following: .sp \fBmywebsite.sls\fP: +.sp +.nf +.ft C +include: + \- apache + +extend: + apache + service: + \- watch: + \- file: mywebsite + +mywebsite: + file: + \- managed + \- name: /etc/httpd/extra/httpd\-vhosts.conf + \- source: salt://httpd\-vhosts.conf +.ft P +.fi .SS \fINames declaration\fP .sp Even more powerful is using a \fInames declaration\fP to override the @@ -1058,12 +1129,8 @@ is hosted by Google Groups. It is open to new members. \fI\%http://groups.google.com/group/salt-users\fP .SS IRC .sp -The Salt IRC channel is hosted on the \fI\%OFTC\fP network. Connect to the OFTC -server: -.sp -\fI\%irc://irc.oftc.net:6667\fP -.sp -and join us in \fB#salt\fP. +The \fB#salt\fP IRC channel is hosted on the popular \fI\%Freenode\fP network. You +can use the \fI\%Freenode webchat client\fP right from your browser. .SS Follow on Github .sp The Salt code is developed via Github. Follow Salt for constant updates on what @@ -1129,7 +1196,7 @@ executions to manipulating the flow of how data is handled by Salt. The minion execution modules or just \fBmodules\fP are the core to what salt is and does. These modules are found in: .sp -\fI\%https://github.com/saltstack/salt/blob/v0.9.4/salt/modules\fP +\fI\%https://github.com/saltstack/salt/blob/v0.9.5/salt/modules\fP .sp These modules are what is called by the salt command line and the salt client api. Adding modules is done by simply adding additional python modules to the @@ -1146,7 +1213,7 @@ of execution modules and types to specific salt minions. .sp The code used to generate the Salt grains can be found here: .sp -\fI\%https://github.com/saltstack/salt/blob/v0.9.4/salt/grains\fP +\fI\%https://github.com/saltstack/salt/blob/v0.9.5/salt/grains\fP .SS States .sp Salt supports state enforcement, this makes Salt a high speed and very efficient @@ -1154,7 +1221,7 @@ solution for system configuration management. .sp States can be easily added to Salt by dropping a new state module in: .sp -\fI\%https://github.com/saltstack/salt/blob/v0.9.4/salt/states\fP +\fI\%https://github.com/saltstack/salt/blob/v0.9.5/salt/states\fP .SS Renderers .sp Salt states are controlled by simple data structures, these structures can be @@ -1165,7 +1232,7 @@ it. .sp The existing renderers can be found here: .sp -\fI\%https://github.com/saltstack/salt/blob/v0.9.4/salt/renderers\fP +\fI\%https://github.com/saltstack/salt/blob/v0.9.5/salt/renderers\fP .SS Returners .sp The salt commands all produce a return value, that return value is sent to the @@ -1175,7 +1242,7 @@ from an SQL or NOSQL database, to a custom application made to use Salt. .sp The existing returners can be found here: .sp -\fI\%https://github.com/saltstack/salt/blob/v0.9.4/salt/returners\fP +\fI\%https://github.com/saltstack/salt/blob/v0.9.5/salt/returners\fP .SS Runners .sp Sometimes a certain application can be made to execute and run from the @@ -1185,7 +1252,7 @@ act as a generic interface for encapsulating master side executions. .sp Existing Salt runners are located here: .sp -\fI\%https://github.com/saltstack/salt/blob/v0.9.4/salt/runners\fP +\fI\%https://github.com/saltstack/salt/blob/v0.9.5/salt/runners\fP .SH MODULES .sp Salt modules are the functions called by the \fBsalt\fP command. @@ -1321,9 +1388,9 @@ regardless of what the actual module is named. .sp The package manager modules are the best example of using the \fB__virtual__\fP function: -\fI\%https://github.com/saltstack/salt/blob/v0.9.4/salt/modules/pacman.py\fP -\fI\%https://github.com/saltstack/salt/blob/v0.9.4/salt/modules/yumpkg.py\fP -\fI\%https://github.com/saltstack/salt/blob/v0.9.4/salt/modules/apt.py\fP +\fI\%https://github.com/saltstack/salt/blob/v0.9.5/salt/modules/pacman.py\fP +\fI\%https://github.com/saltstack/salt/blob/v0.9.5/salt/modules/yumpkg.py\fP +\fI\%https://github.com/saltstack/salt/blob/v0.9.5/salt/modules/apt.py\fP .SS Documentation .sp Salt modules are self documenting, the \fBsys.doc()\fP function will return the @@ -1397,7 +1464,7 @@ functions for salt, but to stand as examples for building out more Salt modules. .sp The existing modules can be found here: -\fI\%https://github.com/saltstack/salt/blob/v0.9.4/salt/modules\fP +\fI\%https://github.com/saltstack/salt/blob/v0.9.5/salt/modules\fP .sp The most simple module is the test module, it contains the simplest salt function, test.ping: @@ -1447,7 +1514,6 @@ _ T{ \fBcluster\fP T} T{ -The cluster module is used to distribute and activate salt HA cluster T} _ T{ @@ -1459,7 +1525,6 @@ _ T{ \fBcp\fP T} T{ -Minion side functions for salt\-cp T} _ T{ @@ -1565,7 +1630,6 @@ _ T{ \fBpublish\fP T} T{ -Publish a command from a minion to a target T} _ T{ @@ -1595,7 +1659,7 @@ _ T{ \fBservice\fP T} T{ -Top level package command wrapper, used to translate the os detected by the +The default service module, if not otherwise specified salt will fall back T} _ T{ @@ -1619,7 +1683,6 @@ _ T{ \fBstate\fP T} T{ -Control the state system on the minion T} _ T{ @@ -1774,8 +1837,26 @@ salt \(aq*\(aq pkg.available_version .UNINDENT .INDENT 0.0 .TP -.B salt.modules.apt.install(pkg, refresh=False) +.B salt.modules.apt.install(pkg, refresh=False, repo=\(aq\(aq, skip_verify=False) Install the passed package +.INDENT 7.0 +.TP +.B pkg +The name of the package to be installed +.TP +.B refresh +False +Update apt before continuing +.TP +.B repo +(default) +Specify a package repository to install from +(e.g., \fBapt\-get \-t unstable install somepackage\fP) +.TP +.B skip_verify +False +Skip the GPG verification check (e.g., \fB\-\-allow\-unauthenticated\fP) +.UNINDENT .sp Return a dict containing the new package names and versions: .sp @@ -1816,8 +1897,8 @@ salt \(aq*\(aq pkg.list_pkgs .INDENT 0.0 .TP .B salt.modules.apt.purge(pkg) -Remove a package via aptitude along with all configuration files and -unused dependencies. +Remove a package via \fBapt\-get purge\fP along with all configuration +files and unused dependencies. .sp Returns a list containing the names of the removed packages .sp @@ -1853,7 +1934,7 @@ salt \(aq*\(aq pkg.refresh_db .INDENT 0.0 .TP .B salt.modules.apt.remove(pkg) -Remove a single package via \fBaptitude remove\fP +Remove a single package via \fBapt\-get remove\fP .sp Returns a list containing the names of the removed packages. .sp @@ -1868,7 +1949,7 @@ salt \(aq*\(aq pkg.remove .INDENT 0.0 .TP .B salt.modules.apt.upgrade(refresh=True) -Upgrades all packages via aptitude full\-upgrade +Upgrades all packages via \fBapt\-get dist\-upgrade\fP .sp Returns a list of dicts containing the package names, and the new and old versions: @@ -1912,7 +1993,7 @@ A module to wrap archive calls .INDENT 0.0 .TP .B salt.modules.archive.gunzip(gzipfile) -Uses the gzip command to create gzip files +Uses the gunzip command to unpack gzip files .sp CLI Example to create \fB/tmp/sourcefile.txt\fP: .sp @@ -2083,16 +2164,6 @@ salt \(aq*\(aq buttervm.local_images .ft P .fi .UNINDENT -.SS salt.modules.cluster -.sp -The cluster module is used to distribute and activate salt HA cluster -components -.INDENT 0.0 -.TP -.B salt.modules.cluster.distrib(minions, master_conf, master_pem, conf_file) -Set up this minion as a failover master \- only intended for use by the -cluster interface -.UNINDENT .SS salt.modules.cmd .sp A module for shelling out @@ -2123,7 +2194,7 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq cat +salt \(aq*\(aq cmd.has_exec cat .ft P .fi .UNINDENT @@ -2149,7 +2220,7 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq cmd.run "ls \-l | grep foo | awk \(aq{print $2}\(aq" +salt \(aq*\(aq cmd.run "ls \-l | awk \(aq/foo/{print $2}\(aq" .ft P .fi .UNINDENT @@ -2162,7 +2233,7 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq cmd.run_all "ls \-l | grep foo | awk \(aq{print $2}\(aq" +salt \(aq*\(aq cmd.run_all "ls \-l | awk \(aq/foo/{print $2}\(aq" .ft P .fi .UNINDENT @@ -2175,7 +2246,7 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq cmd.run "ls \-l | grep foo | awk \(aq{print $2}\(aq" +salt \(aq*\(aq cmd.run_stderr "ls \-l | awk \(aq/foo/{print $2}\(aq" .ft P .fi .UNINDENT @@ -2188,58 +2259,22 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq cmd.run "ls \-l | grep foo | awk \(aq{print $2}\(aq" +salt \(aq*\(aq cmd.run_stdout "ls \-l | awk \(aq/foo/{print $2}\(aq" .ft P .fi .UNINDENT -.SS salt.modules.cp -.sp -Minion side functions for salt\-cp -.INDENT 0.0 -.TP -.B salt.modules.cp.cache_dir(path, env=\(aqbase\(aq) -Download and cache everything under a directory from the master -.UNINDENT -.INDENT 0.0 -.TP -.B salt.modules.cp.cache_file(path, env=\(aqbase\(aq) -Used to cache a single file in the local salt\-master file cache. -.UNINDENT .INDENT 0.0 .TP -.B salt.modules.cp.cache_files(paths, env=\(aqbase\(aq) -Used to gather many files from the master, the gathered files will be -saved in the minion cachedir reflective to the paths retrieved from the -master. -.UNINDENT -.INDENT 0.0 -.TP -.B salt.modules.cp.cache_master(env=\(aqbase\(aq) -Retrieve all of the files on the master and cache them locally -.UNINDENT -.INDENT 0.0 -.TP -.B salt.modules.cp.get_file(path, dest, env=\(aqbase\(aq) -Used to get a single file from the salt master -.UNINDENT -.INDENT 0.0 -.TP -.B salt.modules.cp.hash_file(path, env=\(aqbase\(aq) -Return the hash of a file, to get the hash of a file on the -salt master file server prepend the path with salt:// -otherwise, prepend the file with / for a local file. -.UNINDENT -.INDENT 0.0 -.TP -.B salt.modules.cp.list_master(env=\(aqbase\(aq) -Retrieve all of the files on the master and cache them locally -.UNINDENT -.INDENT 0.0 -.TP -.B salt.modules.cp.recv(files, dest) -Used with salt\-cp, pass the files dict, and the destination. +.B salt.modules.cmd.which(cmd) +Returns the path of an executable available on the minion, None otherwise .sp -This function receives small fast copy files from the master via salt\-cp +CLI Example: +.sp +.nf +.ft C +salt \(aq*\(aq cmd.which cat +.ft P +.fi .UNINDENT .SS salt.modules.cron .sp @@ -2259,11 +2294,29 @@ salt \(aq*\(aq cron.list_tab root .UNINDENT .INDENT 0.0 .TP +.B salt.modules.cron.ls(user) +Return the contents of the specified user\(aqs crontab +.sp +CLI Example: +.sp +.nf +.ft C +salt \(aq*\(aq cron.list_tab root +.ft P +.fi +.UNINDENT +.INDENT 0.0 +.TP .B salt.modules.cron.raw_cron(user) Return the contents of the user\(aqs crontab .UNINDENT .INDENT 0.0 .TP +.B salt.modules.cron.rm(user, minute, hour, dom, month, dow, cmd) +Remove a cron job up for a specified user. +.UNINDENT +.INDENT 0.0 +.TP .B salt.modules.cron.rm_job(user, minute, hour, dom, month, dow, cmd) Remove a cron job up for a specified user. .UNINDENT @@ -2290,6 +2343,19 @@ salt \(aq*\(aq cron.set_special @hourly \(aqecho foobar\(aq Module for gathering disk information .INDENT 0.0 .TP +.B salt.modules.disk.inodeusage() +Return inode usage information for volumes mounted on this minion +.sp +CLI Example: +.sp +.nf +.ft C +salt \(aq*\(aq disk.inodeusage +.ft P +.fi +.UNINDENT +.INDENT 0.0 +.TP .B salt.modules.disk.usage() Return usage information for volumes mounted on this minion .sp @@ -2319,7 +2385,7 @@ salt \(aq*\(aq pkg.available_version .UNINDENT .INDENT 0.0 .TP -.B salt.modules.ebuild.install(pkg, refresh=False) +.B salt.modules.ebuild.install(pkg, refresh=False, **kwargs) Install the passed package .sp Return a dict containing the new package names and versions: @@ -2464,6 +2530,23 @@ Manage information about files on the minion, set/read user, group, and mode data .INDENT 0.0 .TP +.B salt.modules.file.append(path, *args) +Append text to the end of a file +.sp +Usage: +.sp +.nf +.ft C +salt \(aq*\(aq file.append /etc/motd \e + "With all thine offerings thou shalt offer salt."\e + "Salt is what makes things taste bad when it isn\(aqt in them." +.ft P +.fi +.sp +New in version 0.9.5. +.UNINDENT +.INDENT 0.0 +.TP .B salt.modules.file.chgrp(path, group) Change the group of a file .sp @@ -2490,6 +2573,61 @@ salt \(aq*\(aq file.chown /etc/passwd root root .UNINDENT .INDENT 0.0 .TP +.B salt.modules.file.comment(path, regex, char=\(aq#\(aq, backup=\(aq.bak\(aq) +Comment out specified lines in a file +.INDENT 7.0 +.TP +.B path +The full path to the file to be edited +.TP +.B regex +A regular expression used to find the lines that are to be commented; +this pattern will be wrapped in parenthesis and will move any +preceding/trailing \fB^\fP or \fB$\fP characters outside the parenthesis +(e.g., the pattern \fB^foo$\fP will be rewritten as \fB^(foo)$\fP) +.TP +.B char +\fB#\fP +The character to be inserted at the beginning of a line in order to +comment it out +.TP +.B backup +\fB.bak\fP +The file will be backed up before edit with this file extension +.IP Warning +This backup will be overwritten each time \fBsed\fP / \fBcomment\fP / +\fBuncomment\fP is called. Meaning the backup will only be useful +after the first invocation. +.RE +.UNINDENT +.sp +Usage: +.sp +.nf +.ft C +salt \(aq*\(aq file.comment /etc/modules pcspkr +.ft P +.fi +.sp +New in version 0.9.5. +.UNINDENT +.INDENT 0.0 +.TP +.B salt.modules.file.contains(path, text, limit=\(aq\(aq) +Return True if the file at \fBpath\fP contains \fBtext\fP +.sp +Usage: +.sp +.nf +.ft C +salt \(aq*\(aq file.contains /etc/crontab \(aqmymaintenance.sh\(aq +.ft P +.fi +.sp +New in version 0.9.5. +.UNINDENT +.INDENT 0.0 +.TP .B salt.modules.file.find(path, *opts) Approximate the Unix find(1) command and return a list of paths that meet the specified critera. @@ -2606,16 +2744,16 @@ CLI Examples: .sp .nf .ft C -salt \(aq*\(aq / type=f name=\e*.bak size=+10m -salt \(aq*\(aq /var mtime=+30d size=+10m print=path,size,mtime -salt \(aq*\(aq /var/log name=\e*.[0\-9] mtime=+30d size=+10m delete +salt \(aq*\(aq file.find / type=f name=\e*.bak size=+10m +salt \(aq*\(aq file.find /var mtime=+30d size=+10m print=path,size,mtime +salt \(aq*\(aq file.find /var/log name=\e*.[0\-9] mtime=+30d size=+10m delete .ft P .fi .UNINDENT .INDENT 0.0 .TP .B salt.modules.file.get_gid(path) -Return the user that owns a given file +Return the id of the group that owns a given file .sp CLI Example: .sp @@ -2628,7 +2766,7 @@ salt \(aq*\(aq file.get_gid /etc/passwd .INDENT 0.0 .TP .B salt.modules.file.get_group(path) -Return the user that owns a given file +Return the group that owns a given file .sp CLI Example: .sp @@ -2661,14 +2799,14 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq /etc/passwd sha512 +salt \(aq*\(aq file.get_sum /etc/passwd sha512 .ft P .fi .UNINDENT .INDENT 0.0 .TP .B salt.modules.file.get_uid(path) -Return the user that owns a given file +Return the id of the user that owns a given file .sp CLI Example: .sp @@ -2719,62 +2857,175 @@ salt \(aq*\(aq file.group_to_gid root .UNINDENT .INDENT 0.0 .TP -.B salt.modules.file.set_mode(path, mode) -Set the more of a file +.B salt.modules.file.sed(path, before, after, limit=\(aq\(aq, backup=\(aq.bak\(aq, options=\(aq\-r \-e\(aq, flags=\(aqg\(aq) +Make a simple edit to a file .sp -CLI Example: +Equivalent to: .sp .nf .ft C -salt \(aq*\(aq file.set_mode /etc/passwd 0644 +sed "// s/// " .ft P .fi -.UNINDENT -.INDENT 0.0 +.INDENT 7.0 .TP -.B salt.modules.file.uid_to_user(uid) -Convert a uid to a user name +.B path +The full path to the file to be edited +.TP +.B before +A pattern to find in order to replace with \fBafter\fP +.TP +.B after +Text that will replace \fBbefore\fP +.TP +.B limit +\fB\(aq\(aq\fP +An initial pattern to search for before searching for \fBbefore\fP +.TP +.B backup +\fB.bak\fP +The file will be backed up before edit with this file extension; +\fBWARNING:\fP each time \fBsed\fP/\fBcomment\fP/\fBuncomment\fP is called will +overwrite this backup +.TP +.B options +\fB\-r \-e\fP +Options to pass to sed +.TP +.B flags +\fBg\fP +Flags to modify the sed search; e.g., \fBi\fP for case\-insensitve pattern +matching +.UNINDENT .sp -CLI Example: +Forward slashes and single quotes will be escaped automatically in the +\fBbefore\fP and \fBafter\fP patterns. +.sp +Usage: .sp .nf .ft C -salt \(aq*\(aq file.uid_to_user 0 +salt \(aq*\(aq file.sed /etc/httpd/httpd.conf \(aqLogLevel warn\(aq \(aqLogLevel info\(aq .ft P .fi +.sp +New in version 0.9.5. .UNINDENT .INDENT 0.0 .TP -.B salt.modules.file.user_to_uid(user) -Convert user name to a gid +.B salt.modules.file.set_mode(path, mode) +Set the mode of a file .sp CLI Example: .sp .nf .ft C -salt \(aq*\(aq file.user_to_uid root +salt \(aq*\(aq file.set_mode /etc/passwd 0644 .ft P .fi .UNINDENT -.SS salt.modules.freebsdpkg +.INDENT 0.0 +.TP +.B salt.modules.file.touch(name, atime=None, mtime=None) +Just like \(aqnix\(aqs "touch" command, create a file if it +doesn\(aqt exist or simply update the atime and mtime if +it already does. +.INDENT 7.0 +.TP +.B atime: +Access time in Unix epoch time +.TP +.B mtime: +Last modification in Unix epoch time +.TP +.B Usage:: +salt \(aq*\(aq file.touch /var/log/emptyfile +.UNINDENT .sp -Package support for FreeBSD +New in version 0.9.5. +.UNINDENT .INDENT 0.0 .TP -.B salt.modules.freebsdpkg.available_version(name) -The available version of the package in the repository +.B salt.modules.file.uid_to_user(uid) +Convert a uid to a user name .sp CLI Example: .sp .nf .ft C -salt \(aq*\(aq pkg.available_version +salt \(aq*\(aq file.uid_to_user 0 +.ft P +.fi +.UNINDENT +.INDENT 0.0 +.TP +.B salt.modules.file.uncomment(path, regex, char=\(aq#\(aq, backup=\(aq.bak\(aq) +Uncomment specified commented lines in a file +.INDENT 7.0 +.TP +.B path +The full path to the file to be edited +.TP +.B regex +A regular expression used to find the lines that are to be uncommented. +This regex should not include the comment character. A leading \fB^\fP +character will be stripped for convenience (for easily switching +between comment() and uncomment()). +.TP +.B char +\fB#\fP +The character to remove in order to uncomment a line; if a single +whitespace character follows the comment it will also be removed +.TP +.B backup +\fB.bak\fP +The file will be backed up before edit with this file extension; +\fBWARNING:\fP each time \fBsed\fP/\fBcomment\fP/\fBuncomment\fP is called will +overwrite this backup +.UNINDENT +.sp +Usage: +.sp +.nf +.ft C +salt \(aq*\(aq file.uncomment /etc/hosts.deny \(aqALL: PARANOID\(aq +.ft P +.fi +.sp +New in version 0.9.5. +.UNINDENT +.INDENT 0.0 +.TP +.B salt.modules.file.user_to_uid(user) +Convert user name to a uid +.sp +CLI Example: +.sp +.nf +.ft C +salt \(aq*\(aq file.user_to_uid root +.ft P +.fi +.UNINDENT +.SS salt.modules.freebsdpkg +.sp +Package support for FreeBSD +.INDENT 0.0 +.TP +.B salt.modules.freebsdpkg.available_version(name) +The available version of the package in the repository +.sp +CLI Example: +.sp +.nf +.ft C +salt \(aq*\(aq pkg.available_version .ft P .fi .UNINDENT .INDENT 0.0 .TP -.B salt.modules.freebsdpkg.install(name, refresh=False) +.B salt.modules.freebsdpkg.install(name, **kwargs) Install the passed package .sp Return a dict containing the new package names and versions: @@ -2831,7 +3082,7 @@ salt \(aq*\(aq pkg.purge .INDENT 0.0 .TP .B salt.modules.freebsdpkg.refresh_db() -Update the ports tree with portsnap. If the ports tre does not exist it +Update the ports tree with portsnap. If the ports tree does not exist it will be downloaded and set up. .sp CLI Example: @@ -2897,7 +3148,7 @@ salt \(aq*\(aq pkg.version Control aspects of the grains data .INDENT 0.0 .TP -.B salt.modules.grains.item(key) +.B salt.modules.grains.item(key=None) Return a singe component of the grains data .sp CLI Example: @@ -2921,6 +3172,19 @@ salt \(aq*\(aq grains.items .ft P .fi .UNINDENT +.INDENT 0.0 +.TP +.B salt.modules.grains.ls() +Return a list of all available grains +.sp +CLI Example: +.sp +.nf +.ft C +salt \(aq*\(aq grains.ls +.ft P +.fi +.UNINDENT .SS salt.modules.groupadd .sp Manage groups on Linux @@ -2940,13 +3204,13 @@ salt \(aq*\(aq group.add foo 3456 .INDENT 0.0 .TP .B salt.modules.groupadd.chgid(name, gid) -Change the default shell of the user +Change the gid for a named group .sp CLI Example: .sp .nf .ft C -salt \(aq*\(aq user.chshell foo /bin/zsh +salt \(aq*\(aq group.chgid foo 4376 .ft P .fi .UNINDENT @@ -3065,7 +3329,7 @@ salt \(aq*\(aq hosts.rm_host .INDENT 0.0 .TP .B salt.modules.hosts.set_host(ip, alias) -Set the host entry in th hosts file for the given ip, this will overwrite +Set the host entry in the hosts file for the given ip, this will overwrite any previous entry for the given ip .INDENT 7.0 .TP @@ -3092,7 +3356,7 @@ salt \(aq*\(aq kmod.available .INDENT 0.0 .TP .B salt.modules.kmod.check_available(mod) -Check to see if the speciified kernel module is available +Check to see if the specified kernel module is available .sp CLI Example: .sp @@ -3168,7 +3432,7 @@ salt \(aq*\(aq sysctl.get net.ipv4.ip_forward .INDENT 0.0 .TP .B salt.modules.linux_sysctl.persist(name, value, config=\(aq/etc/sysctl.conf\(aq) -Assign and persist a simple sysctl paramater for this minion +Assign and persist a simple sysctl parameter for this minion .sp CLI Example: .sp @@ -3459,7 +3723,7 @@ salt \(aq*\(aq pkg.available_version .UNINDENT .INDENT 0.0 .TP -.B salt.modules.pacman.install(name, refresh=False) +.B salt.modules.pacman.install(name, refresh=False, **kwargs) Install the passed package, add refresh=True to install with an \-Sy .sp Return a dict containing the new package names and versions: @@ -3583,36 +3847,6 @@ salt \(aq*\(aq pkg.version .ft P .fi .UNINDENT -.SS salt.modules.publish -.sp -Publish a command from a minion to a target -.INDENT 0.0 -.TP -.B salt.modules.publish.publish(tgt, fun, arg=None, expr_form=\(aqglob\(aq, returner=\(aq\(aq) -Publish a command from the minion out to other minions, publications need -to be enabled on the Salt master and the minion needs to have permission -to publish the command. The Salt master will also prevent a recursive -publication loop, this means that a minion cannot command another minion -to command another minion as that would create an infinite command loop. -.sp -The arguments sent to the minion publish function are separated with -commas. This means that for a minion executing a command with multiple -args it will look like this: -.sp -.nf -.ft C -salt system.example.com publish.publish \(aq*\(aq user.add \(aqfoo,1020,1020\(aq -.ft P -.fi -.sp -CLI Example: -.sp -.nf -.ft C -salt system.example.com publish.publish \(aq*\(aq cmd.run \(aqls \-la /tmp\(aq -.ft P -.fi -.UNINDENT .SS salt.modules.puppet .sp Execute puppet routines @@ -3649,13 +3883,13 @@ salt \(aq*\(aq group.add foo 3456 .INDENT 0.0 .TP .B salt.modules.pw_group.chgid(name, gid) -Change the default shell of the user +Change the gid for a named group .sp CLI Example: .sp .nf .ft C -salt \(aq*\(aq user.chshell foo /bin/zsh +salt \(aq*\(aq group.chgid foo 4376 .ft P .fi .UNINDENT @@ -3823,7 +4057,7 @@ salt \(aq*\(aq user.info root .INDENT 0.0 .TP .B salt.modules.pw_user.list_groups(name) -Return a list of groups the named user belings to +Return a list of groups the named user belongs to .sp CLI Example: .sp @@ -3856,8 +4090,8 @@ Set the enforcing mode .UNINDENT .SS salt.modules.service .sp -Top level package command wrapper, used to translate the os detected by the -grains to the correct service manager +The default service module, if not otherwise specified salt will fall back +to this basic module .INDENT 0.0 .TP .B salt.modules.service.restart(name) @@ -3924,7 +4158,7 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq shadow.user root +salt \(aq*\(aq shadow.info root .ft P .fi .UNINDENT @@ -3939,7 +4173,7 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq root $1$UYCIxa628.9qXjpQCjM4a.. +salt \(aq*\(aq shadow.set_password root $1$UYCIxa628.9qXjpQCjM4a.. .ft P .fi .UNINDENT @@ -3947,12 +4181,12 @@ salt \(aq*\(aq root $1$UYCIxa628.9qXjpQCjM4a.. .SS Apache Solr Salt Module .sp Author: Jed Glazner -Version: 0.2 -Modified: 9/20/2011 +Version: 0.2.1 +Modified: 12/09/2011 .sp This module uses http requests to talk to the apache solr request handlers to gather information and report errors. Because of this the minion doesn\(aqt -nescessarily need to reside on the actual slave. However if you want to +necessarily need to reside on the actual slave. However if you want to use the signal function the minion must reside on the physical solr host. .sp This module supports multi\-core and standard setups. Certain methods are @@ -4019,7 +4253,7 @@ Get verbose output .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.abort_import(handler, core_name=None, verbose=False) +.B salt.modules.solr.abort_import(handler, host=None, core_name=None, verbose=False) MASTER ONLY Aborts an existing import command to the specified handler. This command can only be run if the minion is is configured with @@ -4030,20 +4264,24 @@ solr.type=master str The name of the data import handler. .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core str (None) The core the handler belongs to. .TP .B verbose -bool (False) +boolean (False) Run the command with verbose output. .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4051,35 +4289,39 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq solr.abort_import dataimport music {\(aqclean\(aq:True} +salt \(aq*\(aq solr.abort_import dataimport None music {\(aqclean\(aq:True} .ft P .fi .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.backup(core_name=None, append_core_to_path=False) +.B salt.modules.solr.backup(host=None, core_name=None, append_core_to_path=False) Tell solr make a backup. This method can be mis\-leading since it uses the backup api. If an error happens during the backup you are not notified. The status: \(aqOK\(aq in the response simply means that solr received the request successfully. .INDENT 7.0 .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core_name str (None) The name of the solr core if using cores. Leave this blank if you are not using cores or if you want to check all cores. .TP .B append_core_to_path -str (False) +boolean (False) If True add the name of the core to the backup path. Assumes that minion backup path is not None. .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4093,27 +4335,39 @@ salt \(aq*\(aq solr.backup music .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.core_status(core_name) +.B salt.modules.solr.core_status(host=None, core_name=None) MULTI\-CORE HOSTS ONLY Get the status for a given core or all cores if no core is specified .INDENT 7.0 .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core_name str The name of the core to reload .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +.ft P +.fi +.sp +CLI Example: +.sp +.nf +.ft C +salt \(aq*\(aq solr.core_status None music .ft P .fi .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.delta_import(handler, core_name=None, options={}, extra=[]) +.B salt.modules.solr.delta_import(handler, host=None, core_name=None, options={}, extra=[]) Submits an import command to the specified handler using specified options. This command can only be run if the minion is is configured with solr.type=master @@ -4123,6 +4377,10 @@ solr.type=master str The name of the data import handler. .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core str (None) The core the handler belongs to. @@ -4138,11 +4396,11 @@ dict ([]) Extra name value pairs to pass to the handler. eg ["name=value"] .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4150,13 +4408,13 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq solr.delta_import dataimport music {\(aqclean\(aq:True} +salt \(aq*\(aq solr.delta_import dataimport None music {\(aqclean\(aq:True} .ft P .fi .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.full_import(handler, core_name=None, options={}, extra=[]) +.B salt.modules.solr.full_import(handler, host=None, core_name=None, options={}, extra=[]) MASTER ONLY Submits an import command to the specified handler using specified options. This command can only be run if the minion is is configured with @@ -4167,6 +4425,10 @@ solr.type=master str The name of the data import handler. .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core str (None) The core the handler belongs to. @@ -4182,11 +4444,11 @@ dict ([]) Extra name value pairs to pass to the handler. e.g. ["name=value"] .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4194,13 +4456,13 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq solr.full_import dataimport music {\(aqclean\(aq:True} +salt \(aq*\(aq solr.full_import dataimport None music {\(aqclean\(aq:True} .ft P .fi .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.import_status(handler, core_name=None, verbose=False) +.B salt.modules.solr.import_status(handler, host=None, core_name=None, verbose=False) Submits an import command to the specified handler using specified options. This command can only be run if the minion is is configured with solr.type: \(aqmaster\(aq @@ -4210,20 +4472,24 @@ solr.type: \(aqmaster\(aq str The name of the data import handler. .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core str (None) The core the handler belongs to. .TP .B verbose -bool (False) +boolean (False) Specifies verbose output .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4231,28 +4497,32 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq solr.import_status dataimport music False +salt \(aq*\(aq solr.import_status dataimport None music False .ft P .fi .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.is_replication_enabled(core_name=None) -USED ONLY BY SLAVES +.B salt.modules.solr.is_replication_enabled(host=None, core_name=None) +SLAVE CALL Check for errors, and determine if a slave is replicating or not. .INDENT 7.0 .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core_name str (None) The name of the solr core if using cores. Leave this blank if you are not using cores or if you want to check all cores. .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4278,11 +4548,11 @@ The name of the solr core if using cores. Leave this blank if you are not using cores or if you want to check all cores. .UNINDENT .sp -Return: dict: +Return: dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4296,24 +4566,30 @@ salt \(aq*\(aq solr.lucene_version .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.match_index_versions(core_name=None) -SLAVE ONLY -Verifies that the master and the slave versions are in sync by comparing -the index version. If you are constantly pushing updates the index the -master and slave versions will seldom match. +.B salt.modules.solr.match_index_versions(host=None, core_name=None) +SLAVE CALL +Verifies that the master and the slave versions are in sync by +comparing the index version. If you are constantly pushing updates +the index the master and slave versions will seldom match. A solution +to this is pause indexing every so often to allow the slave to replicate +and then call this method before allowing indexing to resume. .INDENT 7.0 .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core_name str (None) The name of the solr core if using cores. Leave this blank if you are not using cores or if you want to check all cores. .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4327,28 +4603,32 @@ salt \(aq*\(aq solr.match_index_versions music .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.optimize(core_name=None) -Optimize the solr index. Optimizing the index is a good way to keep Search -queries fast, but it is a very expensive operation. The ideal process is to -run this with a master/slave configuration. Then you can optimize the -master, and push the optimized index to the slaves. If you are running a -single solr instance, or if you are going to run this on a slave be aware -than search performance will be horrible while this command is being run. -Additionally it can take a LONG time to run and your http request may -timeout. If that happens adjust your timeout settings. +.B salt.modules.solr.optimize(host=None, core_name=None) +Search queries fast, but it is a very expensive operation. The ideal +process is to run this with a master/slave configuration. Then you +can optimize the master, and push the optimized index to the slaves. +If you are running a single solr instance, or if you are going to run +this on a slave be aware than search performance will be horrible +while this command is being run. Additionally it can take a LONG time +to run and your http request may timeout. If that happens adjust your +timeout settings. .INDENT 7.0 .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core_name str (None) The name of the solr core if using cores. Leave this blank if you are not using cores or if you want to check all cores. .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4362,21 +4642,25 @@ salt \(aq*\(aq solr.optimize music .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.ping(core_name=None) +.B salt.modules.solr.ping(host=None, core_name=None) Does a health check on solr, makes sure solr can talk to the indexes. .INDENT 7.0 .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core_name str (None) The name of the solr core if using cores. Leave this blank if you are not using cores or if you want to check all cores. .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4390,7 +4674,7 @@ salt \(aq*\(aq solr.ping music .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.reload_core(core_name) +.B salt.modules.solr.reload_core(host=None, core_name=None) MULTI\-CORE HOSTS ONLY Load a new core from the same configuration as an existing registered core. While the "new" core is initializing, the "old" one will continue to accept @@ -4398,22 +4682,36 @@ requests. Once it has finished, all new request will go to the "new" core, and the "old" core will be unloaded. .INDENT 7.0 .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core_name str The name of the core to reload .UNINDENT .sp -Return : dict: +Return : dict: +.sp +.nf +.ft C +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +.ft P +.fi +.sp +CLI Example: .sp .nf .ft C +salt \(aq*\(aq solr.reload_core None music + {\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.reload_import_config(handler, core_name=None, verbose=False) +.B salt.modules.solr.reload_import_config(handler, host=None, core_name=None, verbose=False) MASTER ONLY re\-loads the handler config XML file. This command can only be run if the minion is a \(aqmaster\(aq type @@ -4423,20 +4721,24 @@ This command can only be run if the minion is a \(aqmaster\(aq type str The name of the data import handler. .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core str (None) The core the handler belongs to. .TP .B verbose -bool (False) +boolean (False) Run the command with verbose output. .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4444,27 +4746,31 @@ CLI Example: .sp .nf .ft C -salt \(aq*\(aq solr.reload_import_config dataimport music {\(aqclean\(aq:True} +salt \(aq*\(aq solr.reload_import_config dataimport None music {\(aqclean\(aq:True} .ft P .fi .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.replication_details(core_name=None) +.B salt.modules.solr.replication_details(host=None, core_name=None) Get the full replication details. .INDENT 7.0 .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core_name str (None) The name of the solr core if using cores. Leave this blank if you are not using cores or if you want to check all cores. .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4478,26 +4784,30 @@ salt \(aq*\(aq solr.replication_details music .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.set_is_polling(polling, core_name=None) -SLAVE ONLY +.B salt.modules.solr.set_is_polling(polling, host=None, core_name=None) +SLAVE CALL Prevent the slaves from polling the master for updates. .INDENT 7.0 .TP .B polling -bool +boolean True will enable polling. False will disable it. .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core_name str (None) The name of the solr core if using cores. Leave this blank if you are not using cores or if you want to check all cores. .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4511,7 +4821,7 @@ salt \(aq*\(aq solr.set_is_polling False .UNINDENT .INDENT 0.0 .TP -.B salt.modules.solr.set_replication_enabled(status, core_name) +.B salt.modules.solr.set_replication_enabled(status, host=None, core_name=None) MASTER ONLY Sets the master to ignore poll requests from the slaves. Useful when you don\(aqt want the slaves replicating during indexing or when clearing the @@ -4519,20 +4829,32 @@ index. .INDENT 7.0 .TP .B status -bool +boolean Sets the replication status to the specified state. .TP +.B host +str (None) +The solr host to query. __opts__[\(aqhost\(aq] is default. +.TP .B core_name str (None) The name of the solr core if using cores. Leave this blank if you are not using cores or if you want to set the status on all cores. .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +.ft P +.fi +.sp +CLI Example: +.sp +.nf +.ft C +salt \(aq*\(aq solr.set_replication_enabled false, None, music .ft P .fi .UNINDENT @@ -4572,11 +4894,11 @@ The name of the solr core if using cores. Leave this blank if you are not using cores or if you want to check all cores. .UNINDENT .sp -Return : dict: +Return : dict: .sp .nf .ft C -{\(aqsuccess\(aq:bool, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} +{\(aqsuccess\(aq:boolean, \(aqdata\(aq:dict, \(aqerrors\(aq:list, \(aqwarnings\(aq:list} .ft P .fi .sp @@ -4643,102 +4965,6 @@ salt \(aq*\(aq ssh.set_auth_key dsa \(aq[]\(aq .ssh/authorized_keys .ft P .fi .UNINDENT -.SS salt.modules.state -.sp -Control the state system on the minion -.INDENT 0.0 -.TP -.B salt.modules.state.high(data) -Execute the compound calls stored in a single set of high data -This function is mostly intended for testing the state system -.sp -CLI Example: -.sp -.nf -.ft C -salt \(aq*\(aq state.high \(aq{"vim": {"pkg": ["installed"]}}\(aq -.ft P -.fi -.UNINDENT -.INDENT 0.0 -.TP -.B salt.modules.state.highstate() -Retrive the state data from the salt master for this minion and execute it -.sp -CLI Example: -.sp -.nf -.ft C -salt \(aq*\(aq state.highstate -.ft P -.fi -.UNINDENT -.INDENT 0.0 -.TP -.B salt.modules.state.low(data) -Execute a single low data call -This function is mostly intended for testing the state system -.sp -CLI Example: -.sp -.nf -.ft C -salt \(aq*\(aq state.low \(aq{"state": "pkg", "fun": "installed", "name": "vi"}\(aq -.ft P -.fi -.UNINDENT -.INDENT 0.0 -.TP -.B salt.modules.state.show_highstate() -Retrive the highstate data from the salt master and display it -.sp -CLI Example: -.sp -.nf -.ft C -salt \(aq*\(aq state.show_highstate -.ft P -.fi -.UNINDENT -.INDENT 0.0 -.TP -.B salt.modules.state.show_lowstate() -List out the low data that will be applied to this minion -.sp -CLI Example: -.sp -.nf -.ft C -salt \(aq*\(aq show_lowstate -.ft P -.fi -.UNINDENT -.INDENT 0.0 -.TP -.B salt.modules.state.template(tem) -Execute the information stored in a template file on the minion -.sp -CLI Example: -.sp -.nf -.ft C -salt \(aq*\(aq state.template \(aq\(aq -.ft P -.fi -.UNINDENT -.INDENT 0.0 -.TP -.B salt.modules.state.template_str(tem) -Execute the information stored in a template file on the minion -.sp -CLI Example: -.sp -.nf -.ft C -salt \(aq*\(aq state.template_str \(aq