Hello, trying to use Ansible https://github.com/LemmyNet/lemmy-ansible to install Lemmy on a OVH VPS.

  • Configured DNS and ping it is ok.
  • I can reach the server with a sudo user on SSH

Installed Ansible on my local machine and follow the steps.

When i execute:

$ ansible-playbook -i inventory/hosts lemmy.yml

I have this error (I replaced for this help request real username and real ip address)

PLAY [all] ************************************************************************************************************************************************************************************************************

TASK [check lemmy_base_dir] *******************************************************************************************************************************************************************************************
skipping: [myuser@myip]

TASK [install python for Ansible] *************************************************************************************************************************************************************************************
fatal: [myuser@myip]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: myuser@myip: Permission denied (publickey,password).", "unreachable": true}

PLAY RECAP ************************************************************************************************************************************************************************************************************
myuser@myip      : ok=0    changed=0    unreachable=1    failed=0    skipped=1    rescued=0    ignored=0

What am i missing?

  • MrWiggles
    link
    fedilink
    110 months ago

    How many ssh keys do you have installed on your system? sshd will lock you out after a few failed attempts, the answer is typically ssh config files or just using one key for all services on that machine.

  • @code@lemmy.mayes.io
    link
    fedilink
    110 months ago

    did you update the ansible config files to set myuser and myip to real things its in lemmy-ansible/hosts

  • Dessalines
    link
    fedilink
    02 years ago

    false, “msg”: "Failed to connect to the host via ssh: myuser@myip: Permission denied

    • @skariko@lemmy.mlOP
      link
      fedilink
      02 years ago

      I was able to get it started/running with this command: ansible-playbook -vvv -u USER -k -K -i inventory/hosts lemmy.yml

      Anyway now it ends with an error (it’s Debian 11):

      if \“driver failed programming external connectivity\” in ex.explanation:\n", “invocation”: {“module_args”: {“project_src”: “/srv/lemmy/social.lealternative.net”, “state”: “present”, “pull”: true, “remove_orphans”: true, “docker_host”: “unix://var/run/docker.sock”, “tls_hostname”: “localhost”, “api_version”: “auto”, “timeout”: 10, “tls”: false, “validate_certs”: false, “debug”: false, “hostname_check”: false, “recreate”: “smart”, “build”: false, “remove_volumes”: false, “stopped”: false, “restarted”: false, “dependencies”: true, “nocache”: false, “ca_cert”: null, “client_cert”: null, “client_key”: null, “ssl_version”: null, “project_name”: null, “files”: null, “definition”: null, “remove_images”: null, “scale”: null, “services”: null}}}\n’, b"<stdin>:18: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module’s documentation for alternative uses\n") myuser@myip Failed to connect to the host via ssh: <stdin>:18: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module’s documentation for alternative uses The full traceback is: File “/tmp/ansible_docker_compose_payload_mgoivh5q/main.py”, line 777, in cmd_up self.project.up( File “/usr/lib/python3/dist-packages/compose/project.py”, line 565, in up results, errors = parallel.parallel_execute( File “/usr/lib/python3/dist-packages/compose/parallel.py”, line 112, in parallel_execute raise error_to_reraise File “/usr/lib/python3/dist-packages/compose/parallel.py”, line 210, in producer result = func(obj) File “/usr/lib/python3/dist-packages/compose/project.py”, line 548, in do return service.execute_convergence_plan( File “/usr/lib/python3/dist-packages/compose/service.py”, line 545, in execute_convergence_plan return self._execute_convergence_create( File “/usr/lib/python3/dist-packages/compose/service.py”, line 460, in _execute_convergence_create containers, errors = parallel_execute( File “/usr/lib/python3/dist-packages/compose/parallel.py”, line 112, in parallel_execute raise error_to_reraise File “/usr/lib/python3/dist-packages/compose/parallel.py”, line 210, in producer result = func(obj) File “/usr/lib/python3/dist-packages/compose/service.py”, line 465, in <lambda> lambda service_name: create_and_start(self, service_name.number), File “/usr/lib/python3/dist-packages/compose/service.py”, line 457, in create_and_start self.start_container(container) File “/usr/lib/python3/dist-packages/compose/service.py”, line 627, in start_container if “driver failed programming external connectivity” in ex.explanation:

      fatal: [myuser@myip]: FAILED! => { “changed”: false, “errors”: [], “invocation”: { “module_args”: { “api_version”: “auto”, “build”: false, “ca_cert”: null, “client_cert”: null, “client_key”: null, “debug”: false, “definition”: null, “dependencies”: true, “docker_host”: “unix://var/run/docker.sock”, “files”: null, “hostname_check”: false, “nocache”: false, “project_name”: null, “project_src”: “/srv/lemmy/social.lealternative.net”, “pull”: true, “recreate”: “smart”, “remove_images”: null, “remove_orphans”: true, “remove_volumes”: false, “restarted”: false, “scale”: null, “services”: null, “ssl_version”: null, “state”: “present”, “stopped”: false, “timeout”: 10, “tls”: false, “tls_hostname”: “localhost”, “validate_certs”: false } }, “module_stderr”: “Creating sociallealternativenet_postgres_1 … \nCreating sociallealternativenet_postfix_1 … \nCreating sociallealternativenet_pictrs_1 … \n\u001b[3A\u001b[2K\nCreating sociallealternativenet_postgres_1 … \n\u001b[3B\u001b[1A\u001b[2K\nCreating sociallealternativenet_pictrs_1 … \ny_1 … \n\u001b[3A\u001b[2K\nCreating sociallealternativenet_postfix_1 … \n\u001b[3B”, “module_stdout”: “”, “msg”: “Error starting project a bytes-like object is required, not ‘str’” }