Skip to content

Commit

Permalink
Merge pull request #11 from markstos/yaml-as-yaml
Browse files Browse the repository at this point in the history
Breaking change: autorestic_config is now YAML, not a string.
  • Loading branch information
dbrennand authored Mar 2, 2024
2 parents 7595f3d + f33c533 commit 46a1778
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,14 @@ autorestic_restic_install_directory:
The directories to install the autorestic and restic binaries at.

```yaml
autorestic_config: |-
autorestic_config:
version: 2
locations:
home:
from: /home/me
to: remote
# Every Monday
cron: "0 0 * * MON"
backends:
remote:
type: b2
Expand Down
3 changes: 1 addition & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ autorestic_install_directory:
path: /opt/autorestic/bin
autorestic_restic_install_directory:
path: /opt/restic/bin
autorestic_config: |-
autorestic_config:
version: 2
locations:
home:
from: /home/me
to: remote
# Every Monday
cron: "0 0 * * MON"
backends:
remote:
type: b2
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

- name: Create autorestic configuration file
ansible.builtin.copy:
content: "{{ autorestic_config }}"
content: "{{ autorestic_config | to_yaml }}"
dest: ~/.autorestic.yml
mode: "0600"

Expand Down

0 comments on commit 46a1778

Please sign in to comment.