CDIST-TYPE__JAIL_FREEBSD9(7)

cdist-type__jail_freebsd9 πŸ’–

okay bestie, welcome to the cdist-type__jail_freebsd9(7) page β€” this is the manual for the cdist type that runs the whole jail situation on the FreeBSD side of the house πŸŽ€


✨ NAME ✨

cdist-type__jail_freebsd9 β€” managing FreeBSD jails, the cdist way πŸ’…


🌸 DESCRIPTION 🌸

So here's the vibe: this type is only for FreeBSD <= 9.x, and its whole job is managing jails. That's it, that's the girlboss job description 🫢


πŸ‘‘ REQUIRED PARAMETERS πŸ‘‘

  • state β€” either "present" or "absent", and if you don't say anything it just quietly defaults to "present" ✨
  • jailbase β€” the location of the .tgz archive that holds the base fs for your jails. like, the whole entire base filesystem. no biggie πŸ“

πŸ¦‹ OPTIONAL PARAMETERS πŸ¦‹

  • name β€” the name of the jail. if you don't pass one, it just uses the object_id as the jail name, lowkey iconic of it
  • ip β€” the ifconfig-style IP/netmask combination for the jail guest. heads up bestie: if state is "present", this one is required 😭
  • hostname β€” the FQDN for the jail guest. defaults to whatever the name parameter is, cute
  • interface β€” the name of the physical interface on the jail server that the jail gets bound to. defaults to the first interface found in the output of ifconfig -l 🧚
  • devfs-ruleset β€” the name of the devfs ruleset to associate with the jail. defaults to "jailrules." ⚠️ this ruleset has to be copied to the server via another type, and to even use this option, devfs-enable must be "true."
  • jaildir β€” where on the remote server the jail filesystems get hosted. defaults to /usr/jail πŸ’œ

⭐ BOOLEAN PARAMETERS ⭐

  • stopped β€” do not start the jail πŸ™ˆ
  • devfs-disable β€” whether to disallow devfs mounting within the jail
  • onboot β€” whether to add the jail to rc.conf's jail_list variable

πŸ’€ CAVEATS πŸ’€

ngl this is the part where you need to sit down. this type does not currently support modification of jail options. so if, for example, a jail needs its IP address or netmask changed? you can't just edit it. the jail has to be removed and then re-added with the correct IP address/netmask β€” or you go modify the appropriate line (jail_<name>_ip="...") within rc.conf through some alternate means. that's just how it is, no cap 😭


πŸ’Œ MESSAGES πŸ’Œ

  • start β€” the jail was started
  • stop β€” the jail was stopped
  • create: β€” the jail was created
  • delete β€” the jail was deleted
  • onboot β€” the jail was configured to start on boot

🌈 EXAMPLES 🌈

creating a jail called www, the classic:

# Create a jail called www
__jail_freebsd9 www --state present --ip "192.168.1.2" --jailbase /my/jail/base.tgz

and then removing her πŸ’”:

# Remove the jail called www
__jail_freebsd9 www --state absent --jailbase /my/jail/base.tgz

jail exists but stays unbothered and unstarted:

# The jail www should not be started
__jail_freebsd9 www --state present --stopped \
   --ip "192.168.1.2 netmask 255.255.255.0" \
   --jailbase /my/jail/base.tgz

using name explicitly because we love clarity:

# Use the name variable explicitly
__jail_freebsd9 thisjail --state present --name www \
   --ip "192.168.1.2" \
   --jailbase /my/jail/base.tgz

and finally, going absolutely feral with it πŸ”₯:

# Go nuts
__jail_freebsd9 lotsofoptions --state present --name testjail \
   --ip "192.168.1.100 netmask 255.255.255.0" \
   --hostname "testjail.example.com" --interface "em0" \
   --onboot --jailbase /my/jail/base.tgz --jaildir /jails

πŸŽ€ SEE ALSO πŸŽ€

jail(8) β€” go read the real one too, bestie


🫢 AUTHORS 🫢

Jake Guffey <jake.guffey--@--eprotex.com> β€” ty for your service, king πŸ‘‘


πŸ’– COPYING πŸ’–

Copyright (C) 2012-2016 Jake Guffey. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.


ungleich GmbH 2021


and that's the whole page, periodt πŸ’… this was version 7.0.0, dated Jul 31, 2022, straight from the cdist manual β€” slay, go manage some jails, you got this πŸ¦‹βœ¨

πŸ“¦ where this page comes from