Skip to content

Commit

Permalink
fix: attempted fix for templating in autorestic.yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrennand committed Jun 29, 2024
1 parent 48ca916 commit 2027064
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ autorestic_config:
env:
B2_ACCOUNT_ID: ID
B2_ACCOUNT_KEY: Key
autorestic_config_template: autorestic.yml.j2
autorestic_config_file: ~/.autorestic.yml
autorestic_info: false
autorestic_check: false
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
when: autorestic_architecture is defined

- name: Create autorestic configuration file
ansible.builtin.copy:
content: "{{ autorestic_config | to_nice_yaml(default_style='\"') }}"
ansible.builtin.template:
src: "{{ autorestic_config_template }}"
dest: "{{ autorestic_config_file }}"
mode: "0600"

Expand Down
1 change: 1 addition & 0 deletions templates/autorestic.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ autorestic_config | to_nice_yaml }}

0 comments on commit 2027064

Please sign in to comment.