spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.65k stars 1.01k forks source link

It's possible to use ansible on encrypted HDs? #3051

Open satoshinotdead opened 6 months ago

satoshinotdead commented 6 months ago

I'm using a different port on ssh so I added ansible_port=X to inventory/hosts but I can't install and I suspect it's related to encrypted HD on the server.

I am missing something or I need to modify some scripts to get all working?

Thanks for your time and this fantastic tool 🙏

spantaleev commented 6 months ago

I don't think it's related to your encrypted hard disk.

You're not telling us what the error message is, but it's most likely SSH connectivity/credentials related.

satoshinotdead commented 6 months ago

Thanks for your following up. Sorry, the error is fully related to SSH connection -> Permission denied (publickey)

I'm using a different port to SSH on normal user with sudo privileges on server and localhost. The ansible user it's not root but it's setted up without a password because I turned it off to avoid bruteforce attacks.

Do I need to use a mandatory password in different user than root?

ThellraAK commented 6 months ago

That's more of an ansible problem.

https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_privilege_escalation.html

You can set up ssh to not allow root to login with a password, but still have a root password set.

satoshinotdead commented 6 months ago

You can set up ssh to not allow root to login with a password, but still have a root password set.

Thanks for your following up. I'm OK if I understand this method allows to use Ansible without using become?

That's what I though when I see connection issues but I just want to be sure :)