commit
2b209f8065
5 changed files with 5 additions and 7 deletions
|
@ -326,7 +326,7 @@ def main():
|
||||||
if state in ['dump','import']:
|
if state in ['dump','import']:
|
||||||
if target is None:
|
if target is None:
|
||||||
module.fail_json(msg="with state=%s target is required" % (state))
|
module.fail_json(msg="with state=%s target is required" % (state))
|
||||||
if db == 'all':
|
if db == 'all':
|
||||||
connect_to_db = 'mysql'
|
connect_to_db = 'mysql'
|
||||||
db = 'mysql'
|
db = 'mysql'
|
||||||
all_databases = True
|
all_databases = True
|
||||||
|
|
|
@ -230,10 +230,10 @@ def package_status(m, pkgname, version, cache, state):
|
||||||
try:
|
try:
|
||||||
provided_packages = cache.get_providing_packages(pkgname)
|
provided_packages = cache.get_providing_packages(pkgname)
|
||||||
if provided_packages:
|
if provided_packages:
|
||||||
is_installed = False
|
is_installed = False
|
||||||
# when virtual package providing only one package, look up status of target package
|
# when virtual package providing only one package, look up status of target package
|
||||||
if cache.is_virtual_package(pkgname) and len(provided_packages) == 1:
|
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')
|
installed, upgradable, has_files = package_status(m, package.name, version, cache, state='install')
|
||||||
if installed:
|
if installed:
|
||||||
is_installed = True
|
is_installed = True
|
||||||
|
|
|
@ -121,7 +121,7 @@ class Subversion(object):
|
||||||
def checkout(self):
|
def checkout(self):
|
||||||
'''Creates new svn working directory if it does not already exist.'''
|
'''Creates new svn working directory if it does not already exist.'''
|
||||||
self._exec(["checkout", "-r", self.revision, self.repo, self.dest])
|
self._exec(["checkout", "-r", self.revision, self.repo, self.dest])
|
||||||
|
|
||||||
def export(self, force=False):
|
def export(self, force=False):
|
||||||
'''Export svn repo to directory'''
|
'''Export svn repo to directory'''
|
||||||
cmd = ["export"]
|
cmd = ["export"]
|
||||||
|
|
|
@ -121,7 +121,7 @@ class Group(object):
|
||||||
if len(cmd) == 1:
|
if len(cmd) == 1:
|
||||||
return (None, '', '')
|
return (None, '', '')
|
||||||
if self.module.check_mode:
|
if self.module.check_mode:
|
||||||
return (0, '', '')
|
return (0, '', '')
|
||||||
cmd.append(self.name)
|
cmd.append(self.name)
|
||||||
return self.execute_command(cmd)
|
return self.execute_command(cmd)
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import os
|
|
||||||
import time
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
|
|
Loading…
Add table
Reference in a new issue