Removed install_backup as var (bool) to prevent that this role run

This commit is contained in:
Frank Dornheim 2023-03-11 14:05:11 +01:00
parent d21ae6cf5f
commit c810423b30
11 changed files with 1 additions and 21 deletions

View File

@ -93,7 +93,6 @@ $ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/ansibl
### Optional Arguments
- `install_backup`: If the varialbe (bool) is set to false the installation of the rolle is skipped.
- `borg_dep_packages`: Dependancy Packages to install `borg(backup)` and `borgmatic`.
- `borg_distro_packages`: contains the names of distributions packages for `borg(backup)` and `borgmatic`, only used if `borg_install_method` is set to `package`.
- `borg_encryption_passcommand`: The standard output of this command is used to unlock the encryption key.

View File

@ -181,7 +181,3 @@ argument_specs:
type: str
required: false
description: If the variable is set, a timer is installed. A choice must be made between "cron" and "systemd".
install_backup:
type: bool
required: false
description: If the varialbe is set to false the installation of the rolle is skipped.

View File

@ -1,6 +1,5 @@
---
- name: Install borgbackup
when: install_backup is not defined or install_backup
tags:
- install_backup
block:

View File

@ -4,7 +4,6 @@
- name: Get home dir
when:
- borgbackup_user == "root"
- install_backup is not defined or install_backup
tags:
- install_backup
block:
@ -22,8 +21,7 @@
- name: Create User if borgbackup_user != "root"
when:
- borgbackup_user == "root"
- install_backup is not defined or install_backup
- borgbackup_user != "root"
tags:
- install_backup
ansible.builtin.include_tasks:

View File

@ -1,7 +1,6 @@
---
- name: Create ssh-key (if neeeded) for {{ borgbackup_user }}
when:
- install_backup is not defined or install_backup
- backup_id_rsa is not defined or backup_id_rsa | length == 0
tags:
- install_backup
@ -45,7 +44,6 @@
- name: Install ssh cert and key for user
when:
- install_backup is not defined or install_backup
- backup_id_rsa is defined and backup_id_rsa | length > 0
- backup_id_rsa_pub is defined and backup_id_rsa_pub | length > 0
tags:

View File

@ -1,7 +1,5 @@
---
- name: Configure borgbackup
when:
- install_backup is not defined or install_backup
tags:
- install_backup
block:

View File

@ -1,7 +1,6 @@
---
- name: Init repository
when:
- install_backup is not defined or install_backup
- borgmatic_initialization_repo is defined and borgmatic_initialization_repo
tags:
- install_backup

View File

@ -1,7 +1,6 @@
---
- name: Create borgbackup timer
when:
- install_backup is not defined or install_backup
- borgmatic_timer is defined and borgmatic_timer == "systemd"
tags:
- install_backup
@ -12,7 +11,6 @@
- name: Create borgbackup cron
when:
- install_backup is not defined or install_backup
- borgmatic_timer is defined or borgmatic_timer == "cron"
tags:
- install_backup

View File

@ -3,7 +3,6 @@
tags:
- install_backup
when:
- install_backup is not defined or install_backup
- backup_create_local_user is not defined or backup_create_local_user
- borgbackup_user != "root"
block:

View File

@ -1,7 +1,6 @@
---
- name: Add cron-job for borgmatic (large repo, create and check separate)
when:
- install_backup is not defined or install_backup
- borgmatic_timer is defined and borgmatic_timer == "cron"
- borgmatic_large_repo
tags:
@ -36,7 +35,6 @@
- name: Add cron-job for borgmatic (normal-sized repo)
when:
- install_backup is not defined or install_backup
- borgmatic_timer is defined and borgmatic_timer == "cron"
- not borgmatic_large_repo
tags:
@ -58,7 +56,6 @@
- name: Set PATH for borgmatic cron job.
when:
- install_backup is not defined or install_backup
- borgmatic_timer is defined and borgmatic_timer == "cron"
tags:
- install_backup

View File

@ -1,7 +1,6 @@
---
- name: Create borgbackup timer
when:
- install_backup is not defined or install_backup
- borgmatic_timer is defined and borgmatic_timer == "systemd"
tags:
- install_backup