Skip to content

Commit f33c533

Browse files
committed
Breaking change: autorestic_config is now YAML, not a string.
This change allows Ansible or YAML linters to catch syntax errors in the structure. It also allows syntax highlighting to work.
1 parent 7595f3d commit f33c533

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ autorestic_restic_install_directory:
4545
The directories to install the autorestic and restic binaries at.
4646

4747
```yaml
48-
autorestic_config: |-
48+
autorestic_config:
4949
version: 2
5050
locations:
5151
home:
5252
from: /home/me
5353
to: remote
5454
# Every Monday
5555
cron: "0 0 * * MON"
56-
5756
backends:
5857
remote:
5958
type: b2

defaults/main.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ autorestic_install_directory:
66
path: /opt/autorestic/bin
77
autorestic_restic_install_directory:
88
path: /opt/restic/bin
9-
autorestic_config: |-
9+
autorestic_config:
1010
version: 2
1111
locations:
1212
home:
1313
from: /home/me
1414
to: remote
1515
# Every Monday
1616
cron: "0 0 * * MON"
17-
1817
backends:
1918
remote:
2019
type: b2

tasks/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
- name: Create autorestic configuration file
4949
ansible.builtin.copy:
50-
content: "{{ autorestic_config }}"
50+
content: "{{ autorestic_config | to_yaml }}"
5151
dest: ~/.autorestic.yml
5252
mode: "0600"
5353

0 commit comments

Comments
 (0)