This commit uses the __context__ dict to keep
salt.modules.rh_service._services() from running chkconfig --list and
runlevel every time it is called (which is often). The service.running
and service.dead states will clear the context data before trying to
detect changes.
This fixes#4295.
In 266b86a, user.info was changed in all the user providers to return an
empty dict if the user passed to it was not present. This commit updates
the refs in salt.modules.ssh so that they use dict.get (or check if the
return data from user.info resolves to False) where appropriate.
There are a few remaining refs in salt.states.user.present, but in all
of those remaining cases the user.info function is only run in instances
where the user already exists.
* use password through PGPASSFILE file
* fix checking maintenance_db and runas params: '' and None is equal
* fix bug with escaping in psql_query(), hope default delemiter and quote is enough
* psql_query() now returns list instead of dict, just according table nature
* add gathering tablespace parameter of databases in db_list()
* remove `locale` argument of db_create(), which is probably obsolete
* add db_alter() function for changing db parameters
* present() state now tries to fix db params if it's needed and possible
(what we disscussed in issue #4164)
* fix pep8, formatting and double quotes
This commit makes all user modules use __context__ in the same place,
and have the context variables be named the same. This is so that the
user state can clear the context data, allowing it to be able to tell
what has changed.
Additionally, this commit also reverts some changes that I made a couple
week ago. I was looking for a less wasteful way to get user data for a
given user, and the user state was running user.getent and then looping
through the list of user info dicts. I added some code to the various
user.getent providers at that time that allowed getent to optionally
return the info for a single user. It turns out, the user providers
already have a function that does this: user.info. The user state has
been updated to call user.info rather than user.getent, and the
additional logic that was added to the getent functions in a558d84,
449b1e2, 44ec713, and 031f8f6 has been removed.
* fix bug: unable to set pass env param through command line
* fix bug: if runas set and shell rc files (.bashrc, .profile, etc) contain
something that make stdout output env gathering fails
* fix bug (FreeBSD specific): su -s key has different meening (not about shell)
there is a bug in the code that causes _rvm to return False when rvm is not installed on the root account.
this commit passes runas to is_installed so it queries the correct user