BastilleBSD / bastille

Bastille is an open-source system for automating deployment and management of containerized applications on FreeBSD.
https://bastillebsd.org
BSD 3-Clause "New" or "Revised" License
860 stars 140 forks source link

[ENHANCEMENT] bastille list -a -j (support listing of all jails with output to JSON) #687

Open njthomas opened 8 months ago

njthomas commented 8 months ago

Is your feature request related to a problem? Please describe. On my jail host, I have many jails, but most are not running at any given time:

bastille list lists the running jails bastille list -a lists all the jails

I use jq to parse the JSON output like so:

bastille list -j|jq

However, I cannot combine the -j flag with -a, i.e., the following commands do not work:

bastille list -j -a # the -a is silently ignored bastille list -a -j # the -j is silently ignored

Describe the solution you'd like

I would like to use the -j and -a flag together so that it lists all active and inactive jails, and outputs this list in JSON format.

Describe alternatives you've considered There is a Python package called jc that takes the output of various Unix utilties and converts the output to JSON, but it currently does not support Bastille.

Additional context [None]