Drone

Q: plugins/ansible with ssh on docker Problem

Howdy,

Background:

  • Docker 4 Windows
  • Images:
    plugins/ansible latest 2a12573cd644 4 days ago 273MB
    python latest 3189819ced3e 6 days ago 934MB
    gitea/gitea latest 2adefa62db4e 2 weeks ago 147MB
    drone/drone latest 6b411792b61c 3 weeks ago 67.7MB
    drone/drone-runner-docker latest 13d06841aa75 5 weeks ago 21.5MB
    python 3.8-alpine 8ecf5a48c789 7 weeks ago 78.9MB
    alpine latest a24bb4013296 2 months ago 5.57MB
    drone/git latest 0567007d02a0 2 months ago 67.7MB
    logstash 7.6.2 fa5b3b1e9757 4 months ago 813MB
    kibana 7.6.2 f70986bc5191 4 months ago 1.01GB
    elasticsearch 7.6.2 f29a1ee41030 4 months ago 791MB
    plugins/ansible 2 6bf89793babb 10 months ago 251MB
  • Ubuntu 18.04 in Windows WSL 1
  • Ansible Playbook to pull logfiles for Elastichsearch, with SSH and Jumphost, with Password Authentication (sshpass)

Problem:
a) Ansible Playbook works perfect when I run it from Ubuntu 18.04; It can pull all logfiles from the 22 different servers; So no Problem here,
PLAY RECAP *************************************************************************************************************
t01vm1 : ok=8 changed=0 unreachable=0 failed=0 skipped=9 rescued=0 ignored=0
t01vm2 : ok=8 changed=0 unreachable=0 failed=0 skipped=9 rescued=0 ignored=0

b) Same Playbook with plugins/ansible, does not work and throughs an error:
fatal: [t01vm1]: UNREACHABLE! => {"changed": false, "msg": "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \" echo /tmp/.my-ansible.t01vm1 \"&& mkdir /tmp/.my-ansible.t01vm1/ansible-tmp-1596000566.2384088-57-109049114314905 && echo ansible-tmp-1596000566.2384088-57-109049114314905=\" echo /tmp/.my-ansible.t01vm1/ansible-tmp-1596000566.2384088-57-109049114314905 \" ), exited with result 6", "unreachable": true}

Drone config

kind: pipeline
type: docker
name: logcollector

volumes:
  - name: data
    host:
      path: mystorage

workspace:
  path: /drone/srcs

steps:
- name: runtest
  pull: never
  image: plugins/ansible
  volumes:
  - name: data
    path: /data
  settings:
    playbook: playbooks/logs.yaml
    inventory: config/inventory
    limit: t01vm1
    vault_password:
      from_secret: ansible_vault_password

Docker Command to verify localy:
docker run -it --name test -v C:\work\logs:/logs:ro -w /lo
gs -e PLUGIN_PLAYBOOK=“playbooks/logs.yaml” -e PLUGIN_INVENTORY=“config/inventory” --rm plugins/ansible --limit t01vm1 --vault-password geheim --become

All I can find is that there might be an glibc error involved!?

Q: Can anybody make sense out of this plugins/ansible behaviour?

Thanks and Cheers
Alex