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

ansible.posix.firewalld cannot change target #560

Open
1 task done
bazhil opened this issue Aug 12, 2024 · 0 comments
Open
1 task done

ansible.posix.firewalld cannot change target #560

bazhil opened this issue Aug 12, 2024 · 0 comments
Labels
firewalld synchronize Issue and PR for firewalld module

Comments

@bazhil
Copy link

bazhil commented Aug 12, 2024

Summary

I try to setup firewall with ansible:

      - ansible.posix.firewalld:
          zone: public
          state: enabled
          permanent: true
          target: DROP

and get error: "Unsupported parameters for (ansible.posix.firewalld) module: target Supported parameters include: icmp_block, icmp_block_inversion, immediate, interface, masquerade, offline, permanent, port, rich_rule, service, source, state, timeout, zone"

изображение

In same time in documentation (https://docs.ansible.com/ansible/latest/collections/ansible/posix/firewalld_module.html) i see this example:

- ansible.posix.firewalld:
    zone: internal
    state: present
    permanent: true
    target: ACCEPT

Issue Type

Bug Report

Component Name

firewalld

Ansible Version

$ ansible --version
2.10.6

Configuration

# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 100
DEFAULT_GATHER_SUBSET(/etc/ansible/ansible.cfg) = [u'!all', u'!min', u'distribution', u'network', u'date_time', u'virtualization_role', u'hardware', u'os_family']
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = [u'/opt/<name_product>/ansible/production']
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible/ansible.log
DEFAULT_STRATEGY(/etc/ansible/ansible.cfg) = mitogen_linear
DEFAULT_STRATEGY_PLUGIN_PATH(/etc/ansible/ansible.cfg) = [u'/usr/lib/python2.7/site-packages/ansible_mitogen/plugins/strategy']
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False

OS / Environment

CentOS 7

Steps to Reproduce

      - ansible.posix.firewalld:
          zone: public
          state: enabled
          permanent: true
          target: DROP

Expected Results

I expected, that if etc/firewalld/zones/public.xml will changes default, like after usage of shell command: "firewalld-cmd --permanent --zone=public --set-target=DROP"

Actual Results

Have error:  "Unsupported parameters for (ansible.posix.firewalld) module: target Supported parameters include: icmp_block, icmp_block_inversion, immediate, interface, masquerade, offline, permanent, port, rich_rule, service, source, state, timeout, zone"

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@saito-hideki saito-hideki added the firewalld synchronize Issue and PR for firewalld module label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
firewalld synchronize Issue and PR for firewalld module
Projects
None yet
Development

No branches or pull requests

2 participants