Commit Graph

7838 Commits

Author SHA1 Message Date
Thomas S Hatch
f15c991c56 use single quotes and .format 2012-11-12 11:43:16 -07:00
Thomas S Hatch
5d97b51ef2 Merge pull request #2528 from kjkuan/sls_render_pipe
Sls render pipe
2012-11-12 09:59:24 -08:00
Thomas S Hatch
5d9c41d5a1 Assumption wrt grain type causes traceback on non yum platforms like Arch 2012-11-12 10:55:43 -07:00
Thomas S Hatch
3cb8a12aad Merge pull request #2532 from s0undt3ch/develop
Fix a bug when passing `--doc`. Test Included.
2012-11-12 08:59:13 -08:00
Thomas S Hatch
4e46527c53 Merge pull request #2530 from giantlock/develop
Use watch_in in file.accumulated state.
2012-11-12 08:56:33 -08:00
Thomas S Hatch
15fac10754 Merge pull request #2529 from archtaku/develop
yumpkg logging improvements
2012-11-12 08:51:06 -08:00
Denis Generalov
fa3a06a258 Use watch_in in file.accumulated state. 2012-11-12 11:24:49 +04:00
Thomas S Hatch
d58971f9b7 Fix Gentoo grain 2012-11-12 00:04:56 -07:00
Thomas S Hatch
186fa670e6 Merge pull request #2521 from giantlock/develop
Feature added: state for assembling one file from several states
2012-11-11 22:57:42 -08:00
Erik Johnson
9cedb304ef yumpkg logging improvements
More robust logging for problems with caching RPMs and invalid paths for
local RPM files. Also changed the name of the kwarg used for specifying
RPM files to install. It was "sources", and is now "source". Every other
implementation uses "source", so I made this change to provide a
consistent user experience.

Also, in an earlier commit I referred to package files in pacman.py as
RPM files in some of the comments. Fixed this to avoid confusion.
2012-11-12 00:52:32 -06:00
Thomas S Hatch
0db8a6aa4e Merge pull request #2527 from yumike/fix_pillar_root_docs
Fix pillar_roots configuration example
2012-11-11 22:25:59 -08:00
Mike Yumatov
bafd02e827 Fix pillar_roots configuration example 2012-11-12 10:12:40 +04:00
Thomas S Hatch
6ba1cb03f6 Merge pull request #2526 from archtaku/develop
pacman.py cleanup
2012-11-11 21:52:29 -08:00
Jack Kuan
7ad98acfb4 Fix stateconf unit test and the problem with sls_dir==''. 2012-11-12 00:50:46 -05:00
Erik Johnson
2c84198360 pacman.py cleanup
Some tweaks to the code I added for #2291. These include:

1) Better logging when the package is not successfully cached, or a bad
   path is provided for a local package file.
2) If the package file can't be cached or found locally, the calls to
   list_pkgs() are skipped and an empty dict is returned. No need to run
   these functions when you know there will be no change.
3) The "source" kwarg is explicitly defined in the function definition
   for install().
4) More descriptive docstring for install().
5) Better regexes in _parse_pkg_meta().

Also, in testing I found that the loader throws a traceback when reading
__virtual__() in yumpkg5.py, because part of the value of the osrelease
grain is passed to the int() python built-in. In rolling release distros
like Arch the osrelease grain is empty, so a check has been added to
avoid this traceback.
2012-11-11 23:27:58 -06:00
Jack Kuan
fdeb88cbbe Merge branch 'develop' into sls_render_pipe 2012-11-12 00:18:28 -05:00
Jack Kuan
834a8c8db1 Merge branch 'develop' of github.com:saltstack/salt into develop 2012-11-12 00:17:48 -05:00
Jack Kuan
8cb70d0a6e Update stateconf renderer module doc and revert names declaration support. 2012-11-12 00:16:03 -05:00
Thomas S Hatch
93586c4623 Merge branch 'develop' of git://github.com/archtaku/salt into archtaku-develop
Conflicts:
	salt/modules/zypper.py
2012-11-11 21:33:48 -07:00
Thomas S Hatch
e04e5db091 Merge pull request #2523 from SEJeff/random-module-updates
Random module updates
2012-11-11 20:24:10 -08:00
Thomas S Hatch
1c20258b8d Merge pull request #2522 from cedwards/freebsd
extend pkgng module functionality
2012-11-11 20:20:17 -08:00
Erik Johnson
05aae4f9f4 Add ability to install pkg from RPM file (zypper)
This implements #2291 for zypper. list_pkgs() was also modified. Running
"zypper packages -i" only returns information on installed packages
which are in the repositories. RPMs manually installed do not show up
and thus cannot be tracked. Additionally, running "zypper packages -i"
pulls in data from the repositories to include in its output, which
results in some latency in getting results. Parsing the output from an
rpm -qa both eliminates this latency and allows non-repo packages to be
tracked.
2012-11-11 21:21:47 -06:00
Jeff Schroeder
0f660b3644 Merge pull request #2524 from archtaku/develop
Fix LSB distro detection
2012-11-11 16:38:12 -08:00
Erik Johnson
a76b07edb7 Fix LSB distro detection
OpenSUSE 12.2 has odd output from platform.linux_distribution(), as can
be seen below:

>>> platform.linux_distribution()
('openSUSE ', '12.2', 'x86_64')

Notice the trailing space after openSUSE. This causes the lookup in
_OS_FAMILY_MAP to fail, causing the os_family grain to be set to
'openSUSE ' instead of 'Suse'. By stripping leading and trailing
whitespace from the values returned by platform_linux_distribution(),
this issue is fixed.
2012-11-11 18:29:57 -06:00
Jeff Schroeder
bc630428f4 salt.module.mdadm: a few sanity checks
- Test for mdadm in __virtual__()
    - Make sure the device ie: /dev/md0 exists before running mdadm
      on it. It is easier to blow up before executing a command
2012-11-11 15:28:00 -08:00
Jeff Schroeder
abfe54ffbc Don't run rstrip on puppet module's cmd.run output
This happens by default in cmd.run
2012-11-11 15:22:46 -08:00
Jeff Schroeder
77d08103e7 salt.modules.zypper: check for zypper in $PATH 2012-11-11 15:21:14 -08:00
Christer Edwards
915b3e8588 extend pkgng module functionality
Added audit, install, delete, update and upgrade functions
2012-11-11 16:13:08 -07:00
Jeff Schroeder
d830ade45e Momma sez, "global variables are THE DEVIL"!
In the SELinux salt module, the path of the SELinux filesystem was
cached in a global variable. Instead of using that, memoize a func
that looks up the directory.  Verify *all* of the commands this
module attempts to use are available before running them and having
it blow up. Finally, it moves things to using the standard with ...
try/except mantra for opening the enforce file. Should make things
cleaner
2012-11-11 15:07:00 -08:00
Jeff Schroeder
93039b7871 Add an outputter for grains.ls and a todo to the hosts module 2012-11-11 14:45:48 -08:00
Jeff Schroeder
2c40921d13 Merge branch 'develop' of github.com:saltstack/salt into random-module-updates
Conflicts:
	salt/modules/grub.py
2012-11-11 14:18:36 -08:00
Denis Generalov
c5644b05b8 Fix typo,
Thanks @SEJeff
2012-11-12 02:11:46 +04:00
Pedro Algarvio
152088d727 Include another option into the test_salt_documentation_arguments_not_assumed test. 2012-11-11 20:11:08 +00:00
Pedro Algarvio
59665e2d55 Fix --doc args mangling. 2012-11-11 20:10:49 +00:00
Denis Generalov
841f60f87c Feature added: state for asembling one file from several states 2012-11-11 23:50:18 +04:00
Thomas S Hatch
1a6dc1db5b Merge pull request #2520 from bclermont/postgres_encrypted_password
fix ENCRYPTED usage on user creation
2012-11-11 09:37:39 -08:00
Thomas S Hatch
10df2c4cb5 Merge pull request #2519 from bclermont/overwrite_module_docstring
convert docstring into comment
2012-11-11 09:35:24 -08:00
Bruno Clermont
0e0b04617f fix ENCRYPTED usage on user creation 2012-11-11 22:50:49 +08:00
Bruno Clermont
80074918c0 convert docstring into comment. they probably overwrite the module top docstring. 2012-11-11 22:49:22 +08:00
Jeff Schroeder
290c72a5bb salt.modules.state: make cache file writes more robust
- Wrap open statements in try/except and with
    - Use variables for crazy os.path.joins(). It reads easier

salt.modules.ldap: Add a small todo for ldaps:// and ldapi://
2012-11-10 23:40:24 -08:00
Jeff Schroeder
5d38e271c2 salt.modules.linux_sysctl: make file reads/writes more robust
- Use the maxsplit parameter on all str.split() calls
    - Wrap all file access in try/except and with statements
2012-11-10 23:40:24 -08:00
Thomas S Hatch
5231d8ca9d Fix #923
This detects recursive requisites as the happen, since it was
proven difficult to do so within the verification
2012-11-11 00:23:11 -07:00
Jeff Schroeder
ff9ab11c03 mount module: Raise an exception when ldd isn't available in is_fuse_exec() 2012-11-10 22:52:34 -08:00
Jeff Schroeder
e01c3d52b1 salt.modules.mount: relatively major robustness cleanup
- Make is_fuse_exec() actually work and remove code from it
    - Wrap all open() calls in try/except and use a with statement
2012-11-10 22:49:30 -08:00
Jack Kuan
55235792f7 Use salt's verify_high() for checking salt file errors. 2012-11-11 01:45:06 -05:00
Thomas S Hatch
afe2279cf0 Fix #2377 2012-11-10 23:28:42 -07:00
Jeff Schroeder
c9aa9ad4c4 salt.modules.grub: Fix some silliness from my previous commit 2012-11-10 22:04:06 -08:00
Jeff Schroeder
48228fd91a salt.modules.grub: Fix some bugs and move from boot to grub
Since it makes sense to have separate grub/grub2, syslinux, and lilo
modules because things like conf keys will be TOTALLY different, move
the name from boot to grub.

Use a with statement for reading the config file and also wrap it all
up in a fancy try/except that raises CommandExecutionError on issue.
2012-11-10 21:52:49 -08:00
Jeff Schroeder
152f610e32 salt.utils.yum*: clean up __virtual__() to use os_family grain
Fixes #2294
2012-11-10 21:52:49 -08:00
Jeff Schroeder
a3109cd2ad salt.modules.grub: Fix some bugs and move from boot to grub
Since it makes sense to have separate grub/grub2, syslinux, and lilo
modules because things like conf keys will be TOTALLY different, move
the name from boot to grub.

Use a with statement for reading the config file and also wrap it all
up in a fancy try/except that raises CommandExecutionError on issue.
2012-11-10 21:49:46 -08:00