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

pfsense_setup - Overwrites existing config due to defaults #91

Closed
robindbe opened this issue Sep 14, 2023 · 1 comment · Fixed by #101
Closed

pfsense_setup - Overwrites existing config due to defaults #91

robindbe opened this issue Sep 14, 2023 · 1 comment · Fixed by #101
Labels
bug Something isn't working
Milestone

Comments

@robindbe
Copy link

I was running a playbook to set a specific log setting inside "pfsense_setup" (systemlogsfilterpanel).

    - name: General configuration
      pfsensible.core.pfsense_setup:
        systemlogsfilterpanel: true

After running it on 4 devices I noticed I couldn't login anymore using RADIUS. So after logging in with admin, I saw that the "authmode" setting was reset to "Local database". The session timeout was also back to 240 (we use 30). So I looked around the Python code for that module and I saw those 2 settings together with "shellauth" have a default value hardcoded. https://github.com/pfsensible/core/blob/master/plugins/modules/pfsense_setup.py

That means that if you create a playbook to update any setting using "pfsense_setup" you always have to specify those 3 settings (if you deviate from the defaults).

Is that something that is desirable? If you run the playbook against a large number of hosts, those settings might differ from host to host so it would require to first do a lookup of the config, etc ... which kinda goes against Ansible's idempotency. Not to mention you need to look in the actual Python code to see what the defaults are.

Just throwing it out there :)

@opoplawski
Copy link
Contributor

I don't use the pfsense_setup module myself, but yeah, that behavior does not seem right. The PR removes the defaults from the parameter config and moves it to the documentation.

@opoplawski opoplawski added the bug Something isn't working label Dec 23, 2023
@opoplawski opoplawski added this to the 0.6.0 milestone Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants