Merge branch 'develop' of github.com:saltstack/salt into develop

This commit is contained in:
Thomas S Hatch 2012-09-19 13:24:23 -06:00
commit 2b8320eb49
2 changed files with 11 additions and 3 deletions

View File

@ -127,12 +127,17 @@ def install(name, *args, **kwargs):
salt '*' pkg.install <package name>
'''
if _check_pkgng:
env = ()
if _check_pkgng():
pkg_command = 'pkg install -y'
if 'repo' in kwargs:
env = (('PACKAGESITE', kwargs['repo']),)
else:
pkg_command = 'pkg_add -r'
if 'repo' in kwargs:
env = (('PACKAGEROOT', kwargs['repo']),)
old = list_pkgs()
__salt__['cmd.retcode']('%s {0}'.format(name) % pkg_command)
__salt__['cmd.retcode']('%s {0}'.format(name) % pkg_command, env=env)
new = list_pkgs()
pkgs = {}
for npkg in new:

View File

@ -337,7 +337,10 @@ def set_auth_key(
options=[],
config='.ssh/authorized_keys'):
'''
Add a key to the authorized_keys file
Add a key to the authorized_keys file. The "key" parameter must only be the
string of text that is the encoded key. If the key begins with "ssh-rsa"
or ends with user@host, remove those from the key before passing it to this
function.
CLI Example::