-
Notifications
You must be signed in to change notification settings - Fork 41
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
Make path for saving rules configurable #1
Comments
We don't want to make it configurable, because it would make using the module a lot harder. If you have to write a parameter e.g. But, we do want to make the module detect what distribution it is and save the rules in a different location depending on the detected distribution. This should be relatively easy to do, since Ansible has support for detecting distributions, but we will have to check where each distribution stores this file. I guess on Ubuntu/Debian systems |
Nope :( Unlike RedHat, in Debian there is no default way to save iptables rules. AFAIK, very popular solution is putting into
Also, in Ubuntu ufw may be used, and in RedHat - firewalld. So, I think best algorithm would be this:
|
If
The documentation would state where will the file be saved for all supported distributions, we could even make the module return the path to the rules file, so that you can register this, and e.g. to use it in your custom solution (since that should also be automated with Ansible). |
Returning rules file path is good idea.
For ansible_os_family='RedHat' it definitely should be Anyway, I don't like idea of fixed path anywhere, it reduces flexibility. For example, some embedded system may have |
We might add a new parameter for a custom save path, sooner since it's very easy to add it, but first I would like the users to try the module a little and see how it works for them. |
👍 because I'm managing a custom linux where the rules path is |
For example, on ubuntu with
iptables-persistent
package, it should be/etc/iptables/rules.v{4,6}
. This can be solved by creating symlinks, but that is sloppy solution.The text was updated successfully, but these errors were encountered: