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 malformed config if no passphrase set #148

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

strugee
Copy link
Contributor

@strugee strugee commented Mar 12, 2024

The problem is that if there's no passphrase set, the role will generate this config:

storage:
    encryption_passphrase: 

    [etc.]

but Borgmatic errors out on this config with a message about None not being a string. I considered doing {{ borg_encryption_passphrase or "''" }} but it seemed cleaner to just omit the value entirely. Upstream's default is '' FWIW. I tested this patch in production and borgmatic create successfully runs with it.

@m3nu m3nu merged commit 84b0030 into borgbase:master Mar 12, 2024
@m3nu
Copy link
Collaborator

m3nu commented Mar 12, 2024

Thanks! That's a sensible improvement.

@strugee strugee deleted the empty-password-fix branch March 12, 2024 13:03
@strugee
Copy link
Contributor Author

strugee commented Mar 12, 2024

Much appreciated! Any plans to cut a release soon? If not I'll try and figure out how to pin directly to a commit

@strugee strugee restored the empty-password-fix branch March 15, 2024 19:52
@strugee strugee deleted the empty-password-fix branch March 15, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants