[Bug 261036] rc.d/jail: Support multiple _startN and _stopN variables
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 16 Dec 2024 12:01:20 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261036 crest@rlwinm.de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crest@rlwinm.de --- Comment #3 from crest@rlwinm.de --- As of FreeBSD 14.0 you can have your cake and eat it to when it comes to templating jail configurations (e.g. with Ansible). The idea is to use a /etc/jail.conf that uses a .include directive with a glob pattern that matches all active jails kept inside a single directory. e.g. `.include "/etc/jail.d/*.conf;`. You can repeat this recursively if you don't want to emit the whole jail configuration from a single ansible template (maybe because you assemble the jail piece by piece using multiple roles). In that case you would have a skeleton config in /etc/jail.d/jail123.conf that includes the different parts of the jail: jail123 { .include "/etc/jail.d/jail123.d/*.conf"; } This way you can just use the jail(8) command without having to provide all the jail parameters on the CLI or going through the rc.d script. It also allows using depend (pseudo-)parameter. In my opinion your clever workaround has been overcome by events and is no longer needed except on FreeBSD 13.x. PSA: If you decide to use .include don't use /etc/jail.conf.d for your jail configurations to include because it triggers the old per jail "jail -f $path" logic in the jail rc.d script. -- You are receiving this mail because: You are the assignee for the bug.