Skip to content
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

Add support for iocage instead of jexec #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fungalcofe
Copy link

I create Jails with iocage.
jexec don't work with jail hostname when it's created from iocage.

Edit changed priority:
iocage > jailme > jexec

Copy link
Owner

@austinhyde austinhyde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the requested spelling/formatting...

I haven't used iocage, but as far as I can tell you need to run iocage exec <jail> <command ...>, whereas the existing usage runs <jailme|jexec> <jail> <command ...> (no exec subcommand`).

There's a few things we could do, like set self.connector to "iocage exec" instead of just iocage, or add a switch in exec_command that maps self.connector to the correct invocation.

Could you please double check that and make any required changes?

Comment on lines +82 to 87
Another alternavite to requering root acces is to use the [`iocage`](https://www.freshports.org/sysutils/iocage/) utility.
`iocage` is a "jail/container manager amalgamating some of the bestfeatures and technologies the FreeBSD operating system has to offer"

If you want to use `jailme` or `iocage`, you'll need to ensure it's installed on the jailhost, and specify the user to `sudo` as
via `--become-user` on the command line, or `become_user: username` in a play or task. sshjail will prefer to use `jailme`
if it's installed, whether you are sudoing as root or not.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor spelling/formatting suggestions:

Suggested change
Another alternavite to requering root acces is to use the [`iocage`](https://www.freshports.org/sysutils/iocage/) utility.
`iocage` is a "jail/container manager amalgamating some of the bestfeatures and technologies the FreeBSD operating system has to offer"
If you want to use `jailme` or `iocage`, you'll need to ensure it's installed on the jailhost, and specify the user to `sudo` as
via `--become-user` on the command line, or `become_user: username` in a play or task. sshjail will prefer to use `jailme`
if it's installed, whether you are sudoing as root or not.
Another alternative to requiring root access is to use the [`iocage`](https://www.freshports.org/sysutils/iocage/) utility.
`iocage` is a "jail/container manager amalgamating some of the best features and technologies the FreeBSD operating system has to offer"
If you want to use `jailme` or `iocage`, you'll need to ensure it's installed on the jailhost, and specify the user to `sudo` as
via `--become-user` on the command line, or `become_user: username` in a play or task.
sshjail will prefer to use `iocage`, then `jailme` if they are installed, whether you are sudoing as root or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants