aboutsummaryrefslogtreecommitdiffstats
path: root/tasks/client_create_scripts_each.yml
diff options
context:
space:
mode:
authorColin Wilk <colin@wilk.cx>2026-06-26 22:11:18 +0200
committerColin Wilk <colin@wilk.cx>2026-06-26 22:11:18 +0200
commitbd022f046651d287309b26164cd60a3d6d38471c (patch)
tree557f3ecba27708dbaa9747d53bf571cd91041aac /tasks/client_create_scripts_each.yml
parent2570550feba2abc80c182ca5e6918f29c22c4cf8 (diff)
downloadansible-role-borgbackup-bd022f046651d287309b26164cd60a3d6d38471c.tar.gz
ansible-role-borgbackup-bd022f046651d287309b26164cd60a3d6d38471c.zip
Update and fix pre-commit hooks
Diffstat (limited to 'tasks/client_create_scripts_each.yml')
-rw-r--r--tasks/client_create_scripts_each.yml12
1 files changed, 6 insertions, 6 deletions
diff --git a/tasks/client_create_scripts_each.yml b/tasks/client_create_scripts_each.yml
index f36ba7c..8e01174 100644
--- a/tasks/client_create_scripts_each.yml
+++ b/tasks/client_create_scripts_each.yml
@@ -1,27 +1,27 @@
---
- name: Create script for automatic borg backup
ansible.builtin.file:
- dest: '{{ script_location }}'
+ dest: "{{ script_location }}"
state: touch
owner: root
group: root
modification_time: preserve
access_time: preserve
- mode: '0711'
+ mode: "0711"
become: true
- name: Insert shebang into backup script
ansible.builtin.lineinfile:
- path: '{{ script_location }}'
- line: '#!/bin/bash'
+ path: "{{ script_location }}"
+ line: "#!/bin/bash"
insertbefore: BOF
state: present
become: true
- name: Insert Backup job block into scripts
ansible.builtin.blockinfile:
- path: '{{ script_location }}'
- marker: '## {mark} ANSIBLE MANAGED BLOCK for server: {{ borg_server_host_url }}'
+ path: "{{ script_location }}"
+ marker: "## {mark} ANSIBLE MANAGED BLOCK for server: {{ borg_server_host_url }}"
block: |
export BORG_PASSPHRASE={{ borg_passphrase | quote }}
borg create -C {{ borg_compression }} \