CDIST-TYPE__JAIL(7)

πŸ’– cdist-type__jail β€” the FreeBSD jail bestie πŸ’–

okay so this is a page from the cdist manual, section 7, and it's literally all about managing FreeBSD jails. yesss bestie, we're doing jail time but make it cute πŸ’…


✨ NAME ✨

cdist-type__jail β€” Manage FreeBSD jails


🌸 DESCRIPTION 🌸

so like, this type is the one you reach for on FreeBSD when you wanna manage jails, and the way it does that is by calling the appropriate per-version subtype. it's giving delegation, it's giving main character energy, it's giving "i don't do the work myself, i know a girl who does" 🫢


πŸŽ€ REQUIRED PARAMETERS πŸŽ€

  • state β€” either "present" or "absent", and if you don't say anything it defaults to "present". no cap, it just assumes you want the jail to exist πŸ™ˆ
  • jailbase β€” the location of the .tgz archive that has the base fs for your jails. your whole jail's foundation, literally. iconic.

πŸ¦‹ OPTIONAL PARAMETERS πŸ¦‹

  • name β€” the name of the jail. default is to just use the object_id as the jail name, which is lowkey fine but you can be extra and name it yourself ✨
  • ip β€” the ifconfig style IP/netmask combo to use for the jail guest. and listen: if state is "present", this one is required, so don't forget it bestie 😭
  • hostname β€” the FQDN to use for the jail guest. defaults to whatever you put in the name parameter 🌈
  • interface β€” the name of the physical interface on the jail server to bind the jail to. defaults to the first interface found in the output of ifconfig -l, which is a whole vibe
  • devfs-ruleset β€” the name of the devfs ruleset to associate with the jail. defaults to "jailrules." and heads up, this ruleset must be copied to the server via another type. also, to use this option, devfs-enable must be "true." ⚠️
  • jaildir β€” the location on the remote server to use for hosting jail filesystems. defaults to /usr/jail πŸ’œ

πŸ‘‘ BOOLEAN PARAMETERS πŸ‘‘

  • stopped β€” do not start the jail. sometimes you just need her to chill 😌
  • devfs-disable β€” whether to disallow devfs mounting within the jail
  • onboot β€” whether to add the jail to rc.conf's jail_list variable. she wakes up on her own, periodt πŸ’…

πŸ’€ CAVEATS πŸ’€

okay so this is the part where i hold your hand: this type does not currently support modification of jail options. not even a little. if, for example, a jail needs to have its IP address or netmask changed, the jail must be removed then re-added with the correct IP address/netmask, or the appropriate line (jail_<name>_ip="...") modified within rc.conf through some alternate means. there is no cute little in-place glow-up option. it's delete-and-recreate or nothing, fr fr 😭


πŸ’Œ MESSAGES πŸ’Œ

here's the group chat of things this type can tell you it did:

  • 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 🌟

go off bestie, here's all the ways:

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

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

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

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

# Go nuts
__jail 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
the last one is literally called "Go nuts" and honestly? that's the energy. run every flag, be the moment 🌈

🧚 SEE ALSO 🧚

jail(8) β€” the classic, the original, the blueprint 🫢


🌸 AUTHORS 🌸

Jake Guffey <jake.guffey--@--jointheirstm.org> β€” thank you 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, bestie!! this was cdist-type__jail(7) from the cdist manual, version 7.0.0, dated Jul 31, 2022. slay, you read the whole thing, i'm so proud of you πŸ’…βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from