Merge pull request #1642 from sivel/core-fixups

Core module fix-ups
This commit is contained in:
Brian Coca 2015-07-01 11:00:47 -04:00
commit 2b209f8065
5 changed files with 5 additions and 7 deletions

View file

@ -326,7 +326,7 @@ def main():
if state in ['dump','import']:
if target is None:
module.fail_json(msg="with state=%s target is required" % (state))
if db == 'all':
if db == 'all':
connect_to_db = 'mysql'
db = 'mysql'
all_databases = True

View file

@ -230,10 +230,10 @@ def package_status(m, pkgname, version, cache, state):
try:
provided_packages = cache.get_providing_packages(pkgname)
if provided_packages:
is_installed = False
is_installed = False
# when virtual package providing only one package, look up status of target package
if cache.is_virtual_package(pkgname) and len(provided_packages) == 1:
package = provided_packages[0]
package = provided_packages[0]
installed, upgradable, has_files = package_status(m, package.name, version, cache, state='install')
if installed:
is_installed = True

View file

@ -121,7 +121,7 @@ class Subversion(object):
def checkout(self):
'''Creates new svn working directory if it does not already exist.'''
self._exec(["checkout", "-r", self.revision, self.repo, self.dest])
def export(self, force=False):
'''Export svn repo to directory'''
cmd = ["export"]

View file

@ -121,7 +121,7 @@ class Group(object):
if len(cmd) == 1:
return (None, '', '')
if self.module.check_mode:
return (0, '', '')
return (0, '', '')
cmd.append(self.name)
return self.execute_command(cmd)

View file

@ -18,8 +18,6 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
import os
import time
DOCUMENTATION = '''
---