-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
PVE firewall #62
Comments
That sounds like a good idea. I'm not 100% sure if the firewall rules files can be templated or if you need to use pvesh or something to modify them. (if they can't be templated, then I'd prefer to have a module written for it.) |
I'll have a look and give you a branch, when I've started. |
After a lot of discussion with myself ;-) I think it would be better if this is part of a user specific playbook. The reason for that is easy. There is a file in Also per VMID there is another file in that directory to define the rules per VM. So you need to define an array with IDs you may not know in a general way. Maybe you can configure per Proxmox host (I didn't do that before, because then "all hosts" maybe differ from "one host" and the cluster.fw is a better place for this). After changing the file(s), you only need to reload the pve-firewall service. That's it. So this is very "specific" for the environment. The adventage would be to have an example how the template could be written, but that could end in a little desaster, if it available by default in this role. A possible
a default
and some tasks:
and a handler:
of course, there could be a "nicer" template. In my environment I can't use "ansible_default_ipv4" etc. because of dynamic interface (like docker0) and some systems have IPv6 and other don't have it. So this values are static defined in my inventory. So, this is an example. It could be a good idea to document that and add some settings from this role (like Ceph knowledge). |
So, this role doesn't have it (yet) but in another of my roles, I have an |
Can you give me a hint, which role do you mean? |
Hmmm - I found, that it would be possible to write a module like pve_firewall which pvesh to configure aliases etc. So it would be possible to define role vars (like acl, group and user). I'll start to create that module in a separate branch. |
What happened to this in the end? |
As far as I know, there is no real Ansible role to manage the PVE firewall. Is it a good idea to integrate it here? I would start with it today.
The text was updated successfully, but these errors were encountered: