summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/packaging
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2017-01-27 15:20:31 -0800
committerMatt Clay <matt@mystile.com>2017-01-27 17:08:02 -0800
commitd913f69ba10af797912327f553239081d17a2593 (patch)
tree56188415a88f70d1b4cff2e5c781840c4abc44a0 /lib/ansible/modules/packaging
parent95789f3949b01c79c729315ff375d0e759f64970 (diff)
downloadansible-d913f69ba10af797912327f553239081d17a2593.tar.gz
PEP 8 W291 whitespace cleanup.
Diffstat (limited to 'lib/ansible/modules/packaging')
-rw-r--r--lib/ansible/modules/packaging/os/apt.py2
-rwxr-xr-xlib/ansible/modules/packaging/os/apt_rpm.py4
-rwxr-xr-xlib/ansible/modules/packaging/os/homebrew.py2
-rw-r--r--lib/ansible/modules/packaging/os/layman.py2
-rw-r--r--lib/ansible/modules/packaging/os/pkgng.py6
-rw-r--r--lib/ansible/modules/packaging/os/pkgutil.py6
-rw-r--r--lib/ansible/modules/packaging/os/svr4pkg.py2
-rw-r--r--lib/ansible/modules/packaging/os/urpmi.py8
-rw-r--r--lib/ansible/modules/packaging/os/yum.py10
-rw-r--r--lib/ansible/modules/packaging/os/zypper_repository.py6
10 files changed, 24 insertions, 24 deletions
diff --git a/lib/ansible/modules/packaging/os/apt.py b/lib/ansible/modules/packaging/os/apt.py
index 796ef979c8..5afbfde6e6 100644
--- a/lib/ansible/modules/packaging/os/apt.py
+++ b/lib/ansible/modules/packaging/os/apt.py
@@ -776,7 +776,7 @@ def get_cache(module):
if rc == 0:
break
if rc != 0:
- module.fail_json(msg='Updating the cache to correct corrupt package lists failed:\n%s\n%s' % (str(e), str(so) + str(se)))
+ module.fail_json(msg='Updating the cache to correct corrupt package lists failed:\n%s\n%s' % (str(e), str(so) + str(se)))
# try again
cache = apt.Cache()
else:
diff --git a/lib/ansible/modules/packaging/os/apt_rpm.py b/lib/ansible/modules/packaging/os/apt_rpm.py
index e0d0e2ca50..f800073ea4 100755
--- a/lib/ansible/modules/packaging/os/apt_rpm.py
+++ b/lib/ansible/modules/packaging/os/apt_rpm.py
@@ -2,8 +2,8 @@
# -*- coding: utf-8 -*-
# (c) 2013, Evgenii Terechkov
-# Written by Evgenii Terechkov <evg@altlinux.org>
-# Based on urpmi module written by Philippe Makowski <philippem@mageia.org>
+# Written by Evgenii Terechkov <evg@altlinux.org>
+# Based on urpmi module written by Philippe Makowski <philippem@mageia.org>
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/ansible/modules/packaging/os/homebrew.py b/lib/ansible/modules/packaging/os/homebrew.py
index e381f1a3d8..0d7a13a189 100755
--- a/lib/ansible/modules/packaging/os/homebrew.py
+++ b/lib/ansible/modules/packaging/os/homebrew.py
@@ -179,7 +179,7 @@ class Homebrew(object):
\+ # plusses
- # dashes
: # colons (for URLs)
- @ # at-sign
+ @ # at-sign
'''
INVALID_PATH_REGEX = _create_regex_group(VALID_PATH_CHARS)
diff --git a/lib/ansible/modules/packaging/os/layman.py b/lib/ansible/modules/packaging/os/layman.py
index f18189f69c..9c46cf3190 100644
--- a/lib/ansible/modules/packaging/os/layman.py
+++ b/lib/ansible/modules/packaging/os/layman.py
@@ -157,7 +157,7 @@ def install_overlay(module, name, list_url=None):
layman = init_layman(layman_conf)
if layman.is_installed(name):
- return False
+ return False
if module.check_mode:
mymsg = 'Would add layman repo \'' + name + '\''
diff --git a/lib/ansible/modules/packaging/os/pkgng.py b/lib/ansible/modules/packaging/os/pkgng.py
index df5a9713a4..4b6eac739c 100644
--- a/lib/ansible/modules/packaging/os/pkgng.py
+++ b/lib/ansible/modules/packaging/os/pkgng.py
@@ -4,7 +4,7 @@
# (c) 2013, bleader
# Written by bleader <bleader@ratonland.org>
# Based on pkgin module written by Shaun Zinck <shaun.zinck at gmail.com>
-# that was based on pacman module written by Afterburn <http://github.com/afterburn>
+# that was based on pacman module written by Afterburn <http://github.com/afterburn>
# that was based on apt module written by Matthew Williams <matthew@flowroute.com>
#
# This module is free software: you can redistribute it and/or modify
@@ -86,7 +86,7 @@ options:
required: false
choices: [ "yes", "no" ]
default: no
-author: "bleader (@bleader)"
+author: "bleader (@bleader)"
notes:
- When using pkgsite, be careful that already in cache packages won't be downloaded again.
'''
@@ -102,7 +102,7 @@ EXAMPLES = '''
name: foo,bar
annotation: '+test1=baz,-test2,:test3=foobar'
-# Remove packages foo and bar
+# Remove packages foo and bar
- pkgng:
name: foo,bar
state: absent
diff --git a/lib/ansible/modules/packaging/os/pkgutil.py b/lib/ansible/modules/packaging/os/pkgutil.py
index a54e96eeb0..18654d13f3 100644
--- a/lib/ansible/modules/packaging/os/pkgutil.py
+++ b/lib/ansible/modules/packaging/os/pkgutil.py
@@ -27,7 +27,7 @@ ANSIBLE_METADATA = {'status': ['stableinterface'],
DOCUMENTATION = '''
---
-module: pkgutil
+module: pkgutil
short_description: Manage CSW-Packages on Solaris
description:
- Manages CSW packages (SVR4 format) on Solaris 10 and 11.
@@ -112,7 +112,7 @@ def package_install(module, state, name, site, update_catalog):
if site is not None:
cmd += [ '-t', site ]
if state == 'latest':
- cmd += [ '-f' ]
+ cmd += [ '-f' ]
cmd.append(name)
(rc, out, err) = run_command(module, cmd)
return (rc, out, err)
@@ -186,7 +186,7 @@ def main():
else:
if not package_latest(module, name, site):
if module.check_mode:
- module.exit_json(changed=True)
+ module.exit_json(changed=True)
(rc, out, err) = package_upgrade(module, name, site, update_catalog)
if len(out) > 75:
out = out[:75] + '...'
diff --git a/lib/ansible/modules/packaging/os/svr4pkg.py b/lib/ansible/modules/packaging/os/svr4pkg.py
index 81409e3b2d..69ab376385 100644
--- a/lib/ansible/modules/packaging/os/svr4pkg.py
+++ b/lib/ansible/modules/packaging/os/svr4pkg.py
@@ -157,7 +157,7 @@ def run_command(module, cmd):
def package_install(module, name, src, proxy, response_file, zone, category):
adminfile = create_admin_file()
- cmd = [ 'pkgadd', '-n']
+ cmd = [ 'pkgadd', '-n']
if zone == 'current':
cmd += [ '-G' ]
cmd += [ '-a', adminfile, '-d', src ]
diff --git a/lib/ansible/modules/packaging/os/urpmi.py b/lib/ansible/modules/packaging/os/urpmi.py
index 597fc2eaa5..300bb29570 100644
--- a/lib/ansible/modules/packaging/os/urpmi.py
+++ b/lib/ansible/modules/packaging/os/urpmi.py
@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# (c) 2013, Philippe Makowski
-# Written by Philippe Makowski <philippem@mageia.org>
+# Written by Philippe Makowski <philippem@mageia.org>
# Based on apt module written by Matthew Williams <matthew@flowroute.com>
#
# This module is free software: you can redistribute it and/or modify
@@ -76,16 +76,16 @@ EXAMPLES = '''
pkg: foo
state: absent
-# description: remove packages foo and bar
+# description: remove packages foo and bar
- urpmi:
pkg: foo,bar
state: absent
-# description: update the package database (urpmi.update -a -q) and install bar (bar will be the updated if a newer version exists)
+# description: update the package database (urpmi.update -a -q) and install bar (bar will be the updated if a newer version exists)
- urpmi:
name: bar
state: present
- update_cache: yes
+ update_cache: yes
'''
diff --git a/lib/ansible/modules/packaging/os/yum.py b/lib/ansible/modules/packaging/os/yum.py
index 6f42b96394..800c9fd022 100644
--- a/lib/ansible/modules/packaging/os/yum.py
+++ b/lib/ansible/modules/packaging/os/yum.py
@@ -434,7 +434,7 @@ def is_update(module, repoq, pkgspec, conf_file, qf=def_qf, en_repos=None, dis_r
if not pkgs:
e,m,u = my.pkgSack.matchPackageNames([pkgspec])
pkgs = e + m
- updates = my.doPackageLists(pkgnarrow='updates').updates
+ updates = my.doPackageLists(pkgnarrow='updates').updates
except Exception:
e = get_exception()
module.fail_json(msg="Failure talking to yum: %s" % e)
@@ -524,9 +524,9 @@ def what_provides(module, repoq, req_spec, conf_file, qf=def_qf, en_repos=None,
return set()
def transaction_exists(pkglist):
- """
- checks the package list to see if any packages are
- involved in an incomplete transaction
+ """
+ checks the package list to see if any packages are
+ involved in an incomplete transaction
"""
conflicts = []
@@ -824,7 +824,7 @@ def remove(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos, in
res['results'].append(out)
res['msg'] = err
- # compile the results into one batch. If anything is changed
+ # compile the results into one batch. If anything is changed
# then mark changed
# at the end - if we've end up failed then fail out of the rest
# of the process
diff --git a/lib/ansible/modules/packaging/os/zypper_repository.py b/lib/ansible/modules/packaging/os/zypper_repository.py
index adad2bc195..879d9807c2 100644
--- a/lib/ansible/modules/packaging/os/zypper_repository.py
+++ b/lib/ansible/modules/packaging/os/zypper_repository.py
@@ -87,7 +87,7 @@ options:
version_added: "2.1"
auto_import_keys:
description:
- - Automatically import the gpg signing key of the new or changed repository.
+ - Automatically import the gpg signing key of the new or changed repository.
- Has an effect only if state is I(present). Has no effect on existing (unchanged) repositories or in combination with I(absent).
- Implies runrefresh.
required: false
@@ -111,7 +111,7 @@ options:
version_added: "2.2"
-requirements:
+requirements:
- "zypper >= 1.0 # included in openSuSE >= 11.1 or SuSE Linux Enterprise Server/Desktop >= 11.0"
- python-xml
'''
@@ -246,7 +246,7 @@ def addmodify_repo(module, repodata, old_repos, zypper_version, warnings):
cmd.extend(['--name', repodata['name']])
# priority on addrepo available since 1.12.25
- # https://github.com/openSUSE/zypper/blob/b9b3cb6db76c47dc4c47e26f6a4d2d4a0d12b06d/package/zypper.changes#L327-L336
+ # https://github.com/openSUSE/zypper/blob/b9b3cb6db76c47dc4c47e26f6a4d2d4a0d12b06d/package/zypper.changes#L327-L336
if repodata['priority']:
if zypper_version >= LooseVersion('1.12.25'):
cmd.extend(['--priority', str(repodata['priority'])])