ufw: remove from sanity ignores (#57910)

* Remove from pylint ignore list.

* Make sure that option is called the same as in the documentation.
pull/57966/head
Felix Fontein 5 years ago committed by GitHub
parent 0cf6a418ab
commit f56cf72e2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -321,12 +321,12 @@ def main():
to_ip=dict(type='str', default='any', aliases=['dest', 'to']),
to_port=dict(type='str', aliases=['port']),
proto=dict(type='str', aliases=['protocol'], choices=['ah', 'any', 'esp', 'ipv6', 'tcp', 'udp', 'gre', 'igmp']),
app=dict(type='str', aliases=['name']),
name=dict(type='str', aliases=['app']),
comment=dict(type='str'),
),
supports_check_mode=True,
mutually_exclusive=[
['app', 'proto', 'logging'],
['name', 'proto', 'logging'],
],
required_one_of=([command_keys]),
required_by=dict(
@ -496,7 +496,7 @@ def main():
if relative_to_cmd == 'zero':
insert_to = params['insert']
else:
(_, numbered_state, _) = module.run_command([ufw_bin, 'status', 'numbered'])
(dummy, numbered_state, dummy) = module.run_command([ufw_bin, 'status', 'numbered'])
numbered_line_re = re.compile(R'^\[ *([0-9]+)\] ')
lines = [(numbered_line_re.match(line), '(v6)' in line) for line in numbered_state.splitlines()]
lines = [(int(matcher.group(1)), ipv6) for (matcher, ipv6) in lines if matcher]
@ -524,11 +524,11 @@ def main():
for (key, template) in [('from_ip', "from %s"), ('from_port', "port %s"),
('to_ip', "to %s"), ('to_port', "port %s"),
('proto', "proto %s"), ('app', "app '%s'")]:
('proto', "proto %s"), ('name', "app '%s'")]:
value = params[key]
cmd.append([value, template % (value)])
ufw_major, ufw_minor, _ = ufw_version()
ufw_major, ufw_minor, dummy = ufw_version()
# comment is supported only in ufw version after 0.35
if (ufw_major == 0 and ufw_minor >= 35) or ufw_major > 0:
cmd.append([params['comment'], "comment '%s'" % params['comment']])

@ -64,7 +64,6 @@ lib/ansible/modules/system/lvg.py blacklisted-name
lib/ansible/modules/system/lvol.py blacklisted-name
lib/ansible/modules/system/parted.py blacklisted-name
lib/ansible/modules/system/timezone.py blacklisted-name
lib/ansible/modules/system/ufw.py blacklisted-name
lib/ansible/modules/utilities/logic/wait_for.py blacklisted-name
lib/ansible/modules/web_infrastructure/rundeck_acl_policy.py blacklisted-name
lib/ansible/parsing/vault/__init__.py blacklisted-name

@ -3708,7 +3708,6 @@ lib/ansible/modules/system/syspatch.py E337
lib/ansible/modules/system/systemd.py E336
lib/ansible/modules/system/systemd.py E337
lib/ansible/modules/system/sysvinit.py E337
lib/ansible/modules/system/ufw.py E337
lib/ansible/modules/system/user.py E210
lib/ansible/modules/system/user.py E324
lib/ansible/modules/system/user.py E327

Loading…
Cancel
Save