[TIDY] Set some "diff: false", fix linter warnings
This commit is contained in:
parent
f97ef4dee6
commit
fe97b0ae76
19 changed files with 189 additions and 175 deletions
|
|
@ -5,31 +5,31 @@
|
|||
# - borgbackup_repo
|
||||
# - borgbackup_hostname
|
||||
|
||||
- name: borgbackup - Install
|
||||
- name: Borgbackup - Install
|
||||
when:
|
||||
- borgbackup_passphrase is defined
|
||||
- borgbackup_repo is defined
|
||||
- borgbackup_hostname is defined
|
||||
block:
|
||||
- name: borgbackup - Install application
|
||||
- name: Borgbackup - Install application
|
||||
ansible.builtin.include_tasks: "{{ item }}"
|
||||
with_first_found:
|
||||
- "borgbackup-{{ ansible_distribution }}.{{ ansible_distribution_release }}.yml"
|
||||
- "borgbackup-{{ ansible_distribution }}.yml"
|
||||
- "borgbackup-{{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}.yml"
|
||||
- "borgbackup-{{ (override_os_family is defined) | ternary(override_os_family, ansible_os_family) }}.yml"
|
||||
ignore_errors: true
|
||||
|
||||
# copy backup script and enable cronjob
|
||||
- name: borgbackup - Copy Borgbackup script
|
||||
become: yes
|
||||
- name: Borgbackup - Copy Borgbackup script
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/borgbackup.sh"
|
||||
dest: /usr/local/bin/borgbackup.sh
|
||||
owner: "{{ ansible_user_id }}"
|
||||
group: "{{ ansible_user_id }}"
|
||||
mode: 0775
|
||||
- name: borgbackup - Run Borgbackup script at 1:00 daily
|
||||
become: yes
|
||||
mode: "0775"
|
||||
- name: Borgbackup - Run Borgbackup script at 1:00 daily
|
||||
become: true
|
||||
ansible.builtin.cron:
|
||||
name: "Create Backup"
|
||||
minute: "0"
|
||||
|
|
@ -37,16 +37,16 @@
|
|||
job: "/usr/local/bin/borgbackup.sh"
|
||||
|
||||
# safeguard, if the host variables were removed
|
||||
- name: borgbackup - Uninstall
|
||||
- name: Borgbackup - Uninstall
|
||||
when: (borgbackup_passphrase is not defined) or (borgbackup_repo is not defined) or (borgbackup_hostname is not defined)
|
||||
block:
|
||||
- name: borgbackup - Remove Borgbackup script if no borgbackup config
|
||||
become: yes
|
||||
- name: Borgbackup - Remove Borgbackup script if no borgbackup config
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /usr/local/bin/borgbackup.sh
|
||||
state: absent
|
||||
- name: borgbackup - Remove Cronjob if no borgbackup config
|
||||
become: yes
|
||||
- name: Borgbackup - Remove Cronjob if no borgbackup config
|
||||
become: true
|
||||
ansible.builtin.cron:
|
||||
name: "Create Backup"
|
||||
minute: "0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue