Dear Maintainer,
ansible is a configuration management tool for running lots of servers. The standard way it works is connecting to all the servers via ssh. If ssh is firejailed, then it fails to connect:
$ ansible-playbook -v -i managedserver.com, provision.yml
Using /home/hans/code/fdroid/fdroid-bootstrap-buildserver/ansible.cfg as config file
PLAY [all] ***********************************************************************************************************
TASK [Gathering Facts] ***********************************************************************************************
fatal: [managedserver.com]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Host key fingerprint is SHA256:ruzofPZnPu/YqpeQ4PwtCYi+ygiEOkUAAkXUpgdmgDQ\n+---[ECDSA 256]---+\n|@E+. |\n|o.= o |\n| o.+ |\n|... . . |\n|...o + .S. |\n|o.. . +.o |\n|+. o.+ . |\n|+... oo.+ Bo |\n|oo.o+++.oB+=+ |\n+----[SHA256]-----+", "unreachable": true}
PLAY RECAP ***********************************************************************************************************
managedserver.com : ok=0 changed=0 unreachable=1 failed=0
Looking at firejail --list, it is possible to see the full command line:
1142:hans::/usr/bin/firejail /usr/bin/ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/hans/.ansible/cp/95eb452bcd managedserver.com /bin/sh -c 'echo ~root && sleep 0'
I tried adding this to /etc/firejail/ssh.local, but it didn't change anything:
noblacklist ${HOME}/.ansible/cp
A UNIX socket is opened up in taht directory. Perhaps there is some restriction on UNIX domain sockets that I'm missing?