ansible-role-borgbackup icon indicating copy to clipboard operation
ansible-role-borgbackup copied to clipboard

Auto-create of BorgBase repo not working because of missing borgbase_api_client

Open Joniator opened this issue 3 years ago • 2 comments

The role cant create a borgbase repo, because it can't find the borgbase_api_client.

FAILED! => {"msg": "Could not find imported module support code for ansible.modules.borgbase. Looked for (['ansible.module_utils.borgbase_api_client.client.GraphQLClient', 'ansible.module_utils.borgbase_api_client.client'])"}

If I follow the README in module_utils, and pit the borgbase_api_client from the repo (not the repo itself), after which it works. (Edited because it did not work at first, because I did not properly set my API-Token

I would expect that the dependencies get installed automatically, or are at least documented how to get them up and running.

Am I missing something? Help would be apprecieated, thanks

My requirements.yml:

- src: m3nu.ansible_role_borgbackup

And I run the role like this:

- hosts: example.com
  become: true
  roles:
  - role: m3nu.ansible_role_borgbackup
    borg_encryption_passphrase: "{{ lookup('env', 'BORG_ENCRYPTION_PASSPHRASE') }}"
    create_repo: True
    bb_token: "{{ lookup('env', 'BORGBASE_TOKEN') }}"
    bb_region: eu
    bb_new_sshkey: True
    borg_source_directories:
      - /example/dir

Joniator avatar Nov 12 '21 12:11 Joniator

Agree that this should be documented better or included from the start. Would be best to vendor this dependency into the current repo.

Basically this should go there.

m3nu avatar Nov 12 '21 17:11 m3nu

Personally, I use git submodule for this. Would be a good, easy fix.

p-rintz avatar Apr 12 '22 18:04 p-rintz