Skip to content
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
Closed

iptables flush always reports ok #21182

p53 opened this issue Feb 9, 2017 · 3 comments
Labels
affects_2.2 This issue/PR affects Ansible v2.2 bug This issue/PR relates to a bug. module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@p53
Copy link
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
Copy link
Contributor

ansibot commented Feb 9, 2017

cc @LinusU
click here for bot help

@ansibot ansibot added affects_2.2 This issue/PR affects Ansible v2.2 bug_report module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. labels Feb 9, 2017
@nitzmahone nitzmahone removed the needs_triage Needs a first human triage before being processed. label Feb 10, 2017
@mtpereira
Copy link
Contributor

mtpereira commented Apr 1, 2017

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

@ansibot ansibot added the support:core This issue/PR relates to code supported by the Ansible Engineering Team. label Jun 29, 2017
@sebastiendarocha
Copy link
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

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.2 This issue/PR affects Ansible v2.2 bug This issue/PR relates to a bug. module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

No branches or pull requests

6 participants