I'm trying tyo use Ansible to manage my growing number of jails created with iocage version 0.9.10 2017/12/22.
I use ansible_connection=jail instead of ssh because it make more sens to me. Problem is Ansible can't connect to the host unless I give it a name with jail -m jid=JAILID name=JAILNAME.
But doing like this seems to create two jails if I stop the jail with 矛ocage stop jailname' and then do jls the jail is still showing, and when I restart the jail with iocage start jailname the jail start fine but jls show two jails running with the same name
So, what I want to know is if it's possible to give a jail a proper name on creation ? I always use iocage create -n jailname when creating a jail but it seems to not be the same as jail -m jid=JAILID name=JAILNAME
The jail should be under the name ioc-jailname as far as jail(8) is concerned, are you able to paste some output to show what is happening and what you expect?
@skarekrow yep it is what I was looking for. It work with ioc-jailname
Exemple :
zutsuu% sudo ansible jails -m ping
nginx | FAILED! => {
"msg": "incorrect jail name nginx"
}
ioc-mediaserver | SUCCESS => {
"changed": false,
"ping": "pong"
}
Great! Glad to hear