Closed BirkhoffLee closed 3 years ago
You probably want to escape borg_repository
and borgmatic_hooks
. Else it's not valid YAML and thus the error.
See also http://www.yamllint.com
Thanks @m3nu .
---
- hosts: all
become: true
debugger: on_failed
roles:
- role: m3nu.ansible_role_borgbackup
borg_encryption_passphrase: x-x-x-x-x
borg_repository: "ssh://x@x-x.rsync.net/./x"
borgmatic_hooks: "https://hc-ping.com/x-x-x-x-x"
borg_exclude_patterns:
- '*.pyc'
- '~/*/.cache'
- '.DS_Store'
- '/var/lib/lxcfs/'
- '/var/cache/*'
- '/var/tmp/*'
- '/home/*/.cache/*'
- '/root/.cache/*'
- '/var/lib/yum/yumdb'
borg_remote_path: borg1
borg_source_directories:
- '/etc'
- '/home'
- '/root'
- '/var'
- '/srv'
borg_retention_policy:
keep_daily: 3
keep_weekly: 2
keep_monthly: 2
keep_yearly: 2
yamllint playbook.yml
produces no output. Ansible run still fails:
TASK [m3nu.ansible_role_borgbackup : Add Borgmatic Configuration] ********************************************
fatal: [instance-1]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.parsing.yaml.objects.AnsibleUnicode object' has no attribute 'h'"}
[instance-1] TASK: m3nu.ansible_role_borgbackup : Add Borgmatic Configuration (debug)>
should be
borgmatic_hooks:
healthchecks: 'https://hc-ping.com/a-b-c-d'
instead of
borgmatic_hooks: https://hc-ping.com/a-b-c-d
Playbook config:
Partial logs:
Running on CentOS 7 x64.
I have tried both the version on Ansible Galaxy and here master branch of this repo. Please shed some light on this issue. Thanks