matrix-docker-ansible-deploy icon indicating copy to clipboard operation
matrix-docker-ansible-deploy copied to clipboard

It's possible to use ansible on encrypted HDs?

Open satonotdead opened this issue 1 year ago • 4 comments

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 🙏

satonotdead avatar Dec 18 '23 01:12 satonotdead

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.

spantaleev avatar Dec 18 '23 06:12 spantaleev

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?

satonotdead avatar Dec 18 '23 13:12 satonotdead

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.

ThellraAK avatar Dec 21 '23 03:12 ThellraAK

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 :)

satonotdead avatar Jan 06 '24 21:01 satonotdead