8000 ufw: remove from sanity ignores by felixfontein · Pull Request #57910 · ansible/ansible · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ufw: remove from sanity ignores #57910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/ansible/modules/system/ufw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -496,7 +496,7 @@ def ufw_version():
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]
Expand Down Expand Up @@ -524,11 +524,11 @@ def ufw_version():

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']])
Expand Down
1 change: 0 additions & 1 deletion test/sanity/pylint/ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion test/sanity/validate-modules/ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3709,7 +3709,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
Expand Down
0