Commit Graph

7692 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Jeff Schroeder
74767a6d33 salt.utils.yum*: clean up __virtual__() to use os_family grain
Fixes #2294
2012-11-10 21:34:10 -08:00
Thomas S Hatch
4afe355d87 Use often instead of must 2012-11-10 22:06:16 -07:00
Thomas S Hatch
084694a6ec Fix #2503 2012-11-10 20:53:09 -07:00
Thomas S Hatch
fa6aca4ea8 Fix #2513
This is embarasing, looks like the wrong backend function was being used
2012-11-10 20:49:58 -07:00
Thomas S Hatch
516a8e446e Merge pull request #2517 from techhat/openstack
Adding image_create, image_delete, image_show to openstack glance
2012-11-10 15:12:22 -08:00
Joseph Hall
37fc5a8b84 Adding image_create, image_delete, image_show to openstack glance 2012-11-10 15:05:54 -07:00
David Boucha
2b125f9941 Merge pull request #2516 from giantlock/develop
Doc fix for pull request #2505
2012-11-10 13:02:27 -08:00
Denis Generalov
5652b1f902 splited -> separated
Thanks @UtahDave
2012-11-11 00:59:02 +04:00
Denis Generalov
a423567efa Doc fix for pull request #2505 2012-11-11 00:48:04 +04:00
David Boucha
457e531d99 Merge pull request #2515 from bclermont/postgres_error
handle invalid output here too
2012-11-10 11:47:36 -08:00
Bruno Clermont
64821c63ae handle invalid output here too 2012-11-11 03:45:02 +08:00
David Boucha
cefce3c3b7 Merge pull request #2514 from bclermont/postgres_error
handle psql error
2012-11-10 11:38:10 -08:00
Bruno Clermont
4e34081bb4 handle psql error 2012-11-11 03:33:31 +08:00
Sean Channel
7f673796e6 no depend on libjs-sphinxdoc 2012-11-10 11:18:10 -08:00
David Boucha
d2a629e063 Merge pull request #2511 from UtahDave/develop
use format instead of string join.
2012-11-10 10:52:44 -08:00