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

Write mode rewrites 'poll: 0' as 'poll: 00' in iptables_state #2071

Closed
JKAbrams opened this issue Apr 11, 2022 · 0 comments · Fixed by #2092
Closed

Write mode rewrites 'poll: 0' as 'poll: 00' in iptables_state #2071

JKAbrams opened this issue Apr 11, 2022 · 0 comments · Fixed by #2092
Assignees
Labels

Comments

@JKAbrams
Copy link

Summary

--write changes poll: 0 into poll: 00 for iptables_state

Issue Type
  • Bug Report
Ansible and Ansible Lint details
ansible --version
ansible [core 2.12.3]

ansible-lint --version
ansible-lint 6.0.3.dev10 using ansible 2.12.3
STEPS TO REPRODUCE
ansible-lint --write

This task straight from the documentation triggers the issue.

Before:

---
- hosts: somehost

  tasks:
    # This will load a state from a file, with a rollback in case of access loss
    - name: restore firewall state from a file
      community.general.iptables_state:
        state: restored
        path: /run/iptables.apply
      async: "{{ ansible_timeout }}"
      poll: 0

After:

---
- hosts: somehost

  tasks:
    # This will load a state from a file, with a rollback in case of access loss
    - name: restore firewall state from a file
      community.general.iptables_state:
        state: restored
        path: /run/iptables.apply
      async: "{{ ansible_timeout }}"
      poll: 00

Desired Behavior
      poll: 0
Actual Behavior
      poll: 00
@JKAbrams JKAbrams added bug new Triage required labels Apr 11, 2022
@relrod relrod removed the new Triage required label Apr 13, 2022
ziegenberg added a commit to ziegenberg/ansible-lint that referenced this issue May 1, 2022
Regression tests for issue number ansible#2071.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
ziegenberg added a commit to ziegenberg/ansible-lint that referenced this issue May 1, 2022
Fixes: ansible#2071

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
cognifloyd pushed a commit that referenced this issue May 3, 2022
* add test for wrongly detecting zero as octal

Regression tests for issue number #2071.

* Do not rewrite zero as octal

Fixes: #2071

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants