ansible-role-borgbackup
ansible-role-borgbackup copied to clipboard
Auto-create of BorgBase repo not working because of missing borgbase_api_client
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
Agree that this should be documented better or included from the start. Would be best to vendor this dependency into the current repo.
Personally, I use git submodule for this. Would be a good, easy fix.