From af8dc4c5afed7c6bab7e4ca3c28b7df66926ea71 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 23 Jun 2023 07:27:21 +0100 Subject: [PATCH] Don't use a template when not needed --- tasks/config.yaml | 4 ++-- templates/config.yaml.j2 | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 templates/config.yaml.j2 diff --git a/tasks/config.yaml b/tasks/config.yaml index 6ced336..a72e57c 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -7,12 +7,12 @@ group: root mode: "0700" - name: Write borgmatic config - template: - src: config.yaml.j2 + copy: dest: /etc/borgmatic/config.yaml owner: root group: root mode: "0600" + content: "{{ borgmatic_config | to_nice_yaml( width=50, explicit_start=True, explicit_end=True) }}" - name: Create /root/.borgmatic folder ansible.builtin.file: path: /root/.borgmatic diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 deleted file mode 100644 index 61eb545..0000000 --- a/templates/config.yaml.j2 +++ /dev/null @@ -1 +0,0 @@ -{{ borgmatic_config | to_nice_yaml( width=50, explicit_start=True, explicit_end=True) }}