drone-plugins / drone-ansible

Drone plugin to provision via Ansible
http://plugins.drone.io/drone-plugins/drone-ansible
Apache License 2.0
30 stars 41 forks source link

Q: plugins/ansible with ssh on docker Problem #37

Closed alexrjs closed 3 years ago

alexrjs commented 3 years ago

New Issue on discourse: https://discourse.drone.io/t/q-plugins-ansible-with-ssh-on-docker-problem/7792

tboerger commented 3 years ago

Using sshpass can't work with an image that is 2 months old, the PR to add this to the image had been merged recently and is only part of plugins/ansible:latest.

alexrjs commented 3 years ago

I know... I did the PR... Well and it makes no difference if you use :latest or :2 (in that case i use ansible to install sshpass into the current ansible container)... Same problem... Direct access over pubkey works, password access over jumphost, doesn't... And as I wrote, ansible script is Ok, direct usage in Ubuntu 18.04 works perfect with pubkey and password access over jumphost... So it must be the underlaying base image of plugins/ansible which is not working correctly... IMHO

tboerger commented 3 years ago

I've used this plugin on a daily base with ssh connection and key authentication without any issue, I done know where you problem comes from, I can't reproduce that.

alexrjs commented 3 years ago

image Sure a direct connect to the jumphost with pubkey works perfectly with ubuntu on WSL and with drone & plugins/ansible, but from jumphost to the testservers with sshpass/password does only work ubuntu on WSL not with drone & plugins/ansible.

And as the error message states, plugins/ansible is connected to the testservers, but somehow it has no right to create the ansible_tmp_folder. And as my google search revealed so far it might have to do with the glibc the OS uses in case of plugins/ansible it is a base linux based on alpine... In the other case I have a ubnutu 18.04 LTS on WSL (Windows Subsystem for Linux), which is basically a linux on windows...

So my assumption is, that the base linux from plugins/ansible uses this glibc which breaks things... But how to fix???

tboerger commented 3 years ago

The plugin uses musl libc which is used by alpine linux. I can't imagine why this should lead to trouble.

Switching the base image is out of scope. And it doesn't sound like something we are able to solve within this plugin.

Feel free to debug this issue further, I'm not able to.

alexrjs commented 3 years ago

I know... I really want to give drone and plugins/ansible a try, but if there are technical obstacles I can't solve, I've to try a different approach... My POC has to be done by end of next week, before I go on vacation... So no time to go into a rabbit hole.. Thanks anyway, I close this issue, then...