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

iptables flush always reports ok #21182

Closed
p53 opened this Issue Feb 9, 2017 · 3 comments

Comments

Projects
None yet
6 participants
@p53
Contributor

p53 commented Feb 9, 2017

ISSUE TYPE
  • Bug Report
COMPONENT NAME

iptables

ANSIBLE VERSION
ansible 2.2.0.0
CONFIGURATION

not any special configuration

OS / ENVIRONMENT

control machine ubuntu 16.04

SUMMARY

running:
ansible somehost -i inventory -m iptables 'flush=yes'
answers that's status is ok and changed false, even when rules were there before...

test-ubuntu-16.04 | SUCCESS => {
"chain": null,
"changed": false,
"failed": false,
"flush": true,
"ip_version": "ipv4",
"rule": "",
"state": "present",
"table": "filter"
}

STEPS TO REPRODUCE
ansible test-ubuntu-16.04 -i inventory -m iptables 'flush=yes'
EXPECTED RESULTS
test-ubuntu-16.04 | SUCCESS => {
    "chain": null, 
    "changed": true, 
    "failed": false, 
    "flush": true, 
    "ip_version": "ipv4", 
    "rule": "", 
    "state": "present", 
    "table": "filter"
}
ACTUAL RESULTS
test-ubuntu-16.04 | SUCCESS => {
    "chain": null, 
    "changed": false, 
    "failed": false, 
    "flush": true, 
    "ip_version": "ipv4", 
    "rule": "", 
    "state": "present", 
    "table": "filter"
}
@ansibot

This comment has been minimized.

Contributor

ansibot commented Feb 9, 2017

@mtpereira

This comment has been minimized.

Contributor

mtpereira commented Apr 1, 2017

AFAICT, it doesn't actually flush the existing rules.

@sebastiendarocha

This comment has been minimized.

Contributor

sebastiendarocha commented Sep 22, 2017

Didn't reproduce

fixed by 3691c78

test: system/module/test_iptebles.py: test_flush_table_without_chain

@mscherer could you close this

@mscherer mscherer closed this Sep 22, 2017

@ansibot ansibot added bug and removed bug_report labels Mar 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment