Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix borgmatic removal of config-sections #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

raph2i
Copy link

@raph2i raph2i commented Aug 15, 2023

Hey there,

since borgmatic 1.8 the configuration sections "location, storage, etc." are no longer needed.
as seen on: https://projects.torsion.org/borgmatic-collective/borgmatic/issues/721

@m3nu
Copy link
Collaborator

m3nu commented Aug 15, 2023

Hey, thanks for adding this! Since this breaks older borgmatic versions (e.g. if someone installs from a system package) we should probably bump the major version for this.

@bmbvenom
Copy link

I started experiencing these warnings a couple of days ago after I upgraded borgmatic and was JUST about to open an issue when I decided to check PRs and see if anyone else had submitted anything for it. Thanks @raph2i very much for submitting the PR. @m3nu is there a timeline for the new major version and when it might hit Ansible Galaxy?

@SchizoDuckie
Copy link

There's still a small nitpick for this.

checks:
{% for checks in borgmatic_checks %}
    - name: {{ checks }}
{% endfor %}

But borgmatic is still somehow complaining about the top level sections in the config file with no further details

@m3nu
Copy link
Collaborator

m3nu commented Sep 28, 2023

Well, if we merge this, it will break for all older versions. That's versus having warnings in newer versions.

@SchizoDuckie
Copy link

That's indeed a problem I currently have with my infra. I will try to build upon this to make a version detection and switch the template if i have the time

@aco-jbruhns
Copy link

hi, as this as been stale for about a year, is there any plan to merge this?

{{ hook }}:
{{ borgmatic_hooks[hook] | to_nice_yaml(indent=2) | trim | indent(8) }}
{{ hook }}:
{{ borgmatic_hooks[hook] | to_nice_yaml(indent=2) | trim | indent(8) }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indent needs a tweak here to produce valid YAML when there are multiple entries.

Current result:

image

Proposed patch:

{% for hook in borgmatic_hooks %}
{{ hook }}:
{{ borgmatic_hooks[hook] | to_nice_yaml(indent=4) | indent(4, first=true) }}
{% endfor %}

Resulting yaml:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants